Specs2: skip method

620 views
Skip to first unread message

Daniel Spiewak

unread,
May 8, 2011, 1:15:56 AM5/8/11
to specs...@googlegroups.com
Does the skip method still exist in Specs2?  If so, in what form?  Actually, an even better option (for most cases) would be pendingUntilFixed, which also seems to be absent.

Daniel

etorreborre

unread,
May 8, 2011, 3:54:01 AM5/8/11
to specs-users
Hi Daniel,

Yes there are plenty of ways to do that! You can set an example as
"pendingUntilFixed":

http://etorreborre.github.com/specs2/guide/org.specs2.guide.SpecStructure.html#Set+an+example+as+%22Pending+until+fixed%22

But you can also, in an example, have a matcher which will skip the
example when failing:

http://etorreborre.github.com/specs2/guide/org.specs2.guide.Matchers.html#Matchers+creation
(search for "orSkip").

There's also the possibility to skip ssome or all of the examples by
using arguments. For example, you can use the "skipAll" argument to
skip all the Examples or you can specify "stopOnFail" to skip the
examples after the first failure:

http://etorreborre.github.com/specs2/guide/org.specs2.guide.Runners.html#Runners+guide

Finally you can throw your own Skipped (or Pending) result from inside
an example if you wish:

http://etorreborre.github.com/specs2/guide/org.specs2.guide.Matchers.html#Standard+results

Eric.

PS: can you please post specs2 messages on the specs2 mailing list:
http://groups.google.com/group/specs2-users? (this helps building a
knowledge base on specs2)

Irmo Manie

unread,
May 8, 2011, 3:48:50 AM5/8/11
to specs...@googlegroups.com
Skipped should still be there according to
http://etorreborre.github.com/specs2/guide/org.specs2.guide.SpecStructure.html#Standard+results

Pending untill fixed is described here:
http://etorreborre.github.com/specs2/guide/org.specs2.guide.SpecStructure.html#Thrown+Expectations

- Irmo

> --
> You received this message because you are subscribed to the Google Groups
> "specs-users" group.
> To post to this group, send email to specs...@googlegroups.com.
> To unsubscribe from this group, send email to
> specs-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/specs-users?hl=en.
>

Daniel Spiewak

unread,
May 8, 2011, 10:44:29 AM5/8/11
to specs...@googlegroups.com
Thanks for the info!  Switching over to the Specs2 mailing-list…

Daniel

Reply all
Reply to author
Forward
0 new messages