specs2 support? 关注 Stephan B 创建于 2011年03月28日 18:15 specs2 is out - is support for it planned?[when I try to run it IntelliJ says it can't find the specs runner (the package names changed)]Cheers,Stephan
I'm all for it :)! Let me know how I can help to make it super-good.
Please, PLEASE, PLEASE, make it so that I can place breakpoints inside tests.
Uhm, breakpoints that work...
I just added specs2 support for the latest specs2 snapshot build.
Please wait next plugin nightly build.
I can't make it work. I'm using v 860 of the plugin and there is no specs2 config to select from, only specs.
And if I try to use that kind of configuration, I get an Error "Specs not specified".
Thanks for telling me how to debug this or what kind of mistake I'm doing.
Yes I got it working, I guess I was too impatient and had to wait for v.866 :).
One question: is it on purpose that you're only reporting examples for now and not "contextStart"/"contextEnd"?
(I observed an issue which seems to be on my side so I'll have a look at it).
Thanks a lot for your work!!
> I observed an issue which seems to be on my side so I'll have a look at it
I was wrong. There's no issue, just that some pieces of text are not yet reported.
0.4.866 should work as it was with Specs 1.
When I'll have more time, I'll try to improve support to run only one example (do you have such API? Is it same as it was in Specs1?), and navigation from test to source.
There are several options which can be passed to the command line as arguments.
In the context of IDEA I think that the following make sense:
That being said, those arguments can, for now, be added in the specification itself by the user. On the other hand if we execute a specification with 2 "contexts" we'll get a display with all examples grouped at once:
So that might be the first thing to work on.
I've added a few new features to the Specs Runners as an early Easter present!
Run a single example
Select the name of the example, CTRL-SHIFT-F10. (Specs and Specs2)
This is done with an Example Filter, so if there are multiple test with the same name in different contexts, they would all be run.
Navigation to Source
I've also added navigation from the Test Tree back to the source. (Specs2 only)
Tests failing with a actual/expected error can now trigger a text diff pop-up. Multi-line strings differences are shown with a hyperlink. (Specs and Specs2)
I've opened an issue in Specs2 to help us implement this more cleanly: https://github.com/etorreborre/specs2/issues/9
Nested contexts are correctly displayed, and errors and failures are now correctly colour-coded.
Breakpoints in call-by-name arguments, e.g the body of Specs example, are now working.
Jason, you're my hero!
I've added the necessary Details object to the Notifier interface in the latest snapshot.
I can't wait for the next nightly plugin :).
I've added that overload to our notifier in readiness. I will test it out in the next day or two.
Would that be possible to get the options in the "Test options:" field of a run configuration being passed to specs2 notifier runner?
Try the next nightly.
It works fine for me, thanks!