3

I created a new grails app, with an empty controller that just renders "hello".

Then i created a bunch of unit tests that just verify that it says hello, basically this x 4:

void "test something"() {
    when:
    controller.index()

    then:
    response.text == "hello"
}

However, in my output, it seems to think that there are 2 tests, at least initially:

Running 2 unit tests...
Running 2 unit tests... 1 of 2
Running 2 unit tests... 2 of 2
Running 2 unit tests... 3 of 3
Running 2 unit tests... 4 of 4
Completed 4 unit tests, 0 failed in 0m 5s

What's wrong?

Charlotte Tan
  • 2,452
  • 2
  • 20
  • 24
  • I noticed this worked ok in 2.2 and then broke when we upgraded to 2.3. When it says "Running 2 unit tests", I think that "2" is the number of test classes. However when the tests are being executed, it's actually incrementing the number of test methods that have been run. It's only a minor niggle for us though... – rcgeorge23 Oct 22 '14 at 07:32

1 Answers1

0

You are not doing anything wrong. See https://jira.grails.org/browse/GRAILS-11473.

Sorry for the trouble.

Jeff Scott Brown
  • 26,804
  • 2
  • 30
  • 47