Disable a test

1,205 views
Skip to first unread message

Trav

unread,
Dec 21, 2011, 12:10:10 PM12/21/11
to specs2-users
Is there a way to disable a test without commenting it out?

Chris Carrier

unread,
Dec 21, 2011, 12:11:58 PM12/21/11
to specs2...@googlegroups.com

etorreborre

unread,
Dec 21, 2011, 4:36:00 PM12/21/11
to specs2...@googlegroups.com
You can also use the `PendingUntilFixed` trait if this is an example which is temporarily failing. Then, when you fix the code, that trait will remind you to unmark this example as pending.

Iwein Fuld

unread,
Apr 3, 2013, 9:42:38 AM4/3/13
to specs2...@googlegroups.com
I've very happily used pendingUntilFixed before, but now I actually want to prevent execution because it is slow. Can I do that too?

Konrad Malawski

unread,
Apr 3, 2013, 9:44:37 AM4/3/13
to specs2...@googlegroups.com
Hey Iwein,

You can use ignore instead of it in front of a test (in a FlatSpec) for example :-)


--
Cheers,
Konrad Malawski

--
You received this message because you are subscribed to the Google Groups "specs2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specs2-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Konrad Malawski

unread,
Apr 3, 2013, 9:51:28 AM4/3/13
to specs2...@googlegroups.com
Oh gosh, wrong mailing list... Sorry - thought that's the ScalaTest mailing list somehow (the `pendingUntilFixed` matched in my mind).
Sorry for the confusion caused :-)

-- 
Pozdrawiam,
Konrad Malawski
softwaremill.pl - SoftwareMill | blog.project13.pl - Private Blog
krakow.gtug.pl - GDG Kraków | java.pl - Polish Java User Group


2013/4/3 Konrad Malawski <konrad....@project13.pl>

etorreborre

unread,
Apr 3, 2013, 10:20:07 PM4/3/13
to specs2...@googlegroups.com
You can add `skipped` at the beginning of the test if you want to (for a mutable Specification). This will throw an exception which will skip the whole example.

You can also use tags to exclude tests from being executed.

Cheers,

Eric.
Reply all
Reply to author
Forward
0 new messages