Grails 2.4.3单元测试次数不正确

时间:2014-10-21 23:03:23

标签: unit-testing grails spock grails-2.4

我创建了一个新的grails应用程序,其中一个空控制器只是呈现“hello”。

然后我创建了一系列单元测试,只是验证它是否为hello,基本上是x 4:

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

    then:
    response.text == "hello"
}

然而,在我的输出中,似乎认为有两个测试,至少在最初:

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

怎么了?

1 个答案:

答案 0 :(得分:0)

你没有做错任何事。见https://jira.grails.org/browse/GRAILS-11473

对不起,不好意思。

相关问题