Closed GoogleCodeExporter closed 9 years ago
Works fine for me.
Original comment by pnied...@gmail.com
on 25 Jun 2013 at 4:30
hrm.. 100% of the times I try, it runs 100% of my tests hah.
Original comment by rstud...@gmail.com
on 25 Jun 2013 at 6:14
Note the correct syntax is
-D{testTask}.single=MyTest
If your tests are executed in a task called `testRelease` for instance, you
have to specify
-DtestRelease.single=MyTest
But as reported by the author of this issue, using this seems to force the
usage of JUnit test runner rather than the Spock one. So for me there is still
an issue.
Original comment by thomas.bruyelle@gmail.com
on 6 Nov 2013 at 7:51
I'd need a way to reproduce this. We regularly use `-Dtest.single` for Spock
tests without any problems.
Original comment by pnied...@gmail.com
on 6 Nov 2013 at 6:05
Just tried again with Gradle 1.8 and it worked fine. If there is a problem
here, it's likely on Gradle's side. If you could provide a self-contained
reproducible example over at http://forums.gradle.org, that would be great.
In general, it's better to let the build tool or IDE control which tests to
execute. In terms of test suites, you can use JUnit test suites. There is also
Spock's `@IgnoreRest`, and you can use includes/excludes in Spock's
configuration file (the latter isn't currently documented much).
I'm closing this issue as I think there isn't much that Spock can do here.
Perhaps we can one day provide something better than JUnit's test suites, but
that's a different story.
Original comment by pnied...@gmail.com
on 6 Nov 2013 at 6:18
Did your test still run if you use closure in a then: block ?
Something like
then:
1 * view.setAttachments({ it?.size == 3 })
That's the way I reproduce the issue. Without the closure, it works fine.
Please give a try and tell us.
Original comment by thomas.bruyelle@gmail.com
on 6 Nov 2013 at 8:37
Works fine for me even in that case. If you can provide a self-contained
reproducible example over at http://forums.gradle.org, I'll have another look.
Original comment by pnied...@gmail.com
on 6 Nov 2013 at 10:10
Original issue reported on code.google.com by
rstud...@gmail.com
on 25 Jun 2013 at 12:03