Is there a way to get specifications (code filtering) from my Spock tests printed in a file?
For example, for the following specification:
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
}
}
should print something like:
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
source
share