Grails 从Spock规范中提取规范

Grails 从Spock规范中提取规范,grails,spock,Grails,Spock,有没有办法从打印在文件中的Spock测试中获取规范(过滤代码) 例如,对于以下规范: class CarSpec extends IntegrationSpec { def 'it should not retrieve deleted cars'() { given: 'a car' def car = new Car(uniqueName: 'carName') car.save() when: 'I

有没有办法从打印在文件中的Spock测试中获取规范(过滤代码)

例如,对于以下规范:

class CarSpec extends IntegrationSpec {

    def 'it should not retrieve deleted cars'() {
        given: 'a car'
            def car = new Car(uniqueName: 'carName')
            car.save()
        when: 'I delete the car'
            car.delete()
        then: 'it shouldn't find me the car on the DB'
            Car.find { uniqueName == 'carName' } == null
    }
}
应该打印如下内容:

CarSpec
    it should not retrieve deleted cars
        given a car
        when I delete the car
        then it shouldn't find me the car on the DB

您可以使用一个可用的第三方插件(例如),或编写自己的Spock扩展(请参阅)。

您有关于如何使用损坏控制插件的说明吗?自述文件似乎不够清晰。我注意到您是
spock.lang.@Issue
-有没有一种简单的方法可以让损坏控制报告包含报告上的链接?您必须询问损坏控制报告的作者。