pending in feature crashes the complete test class

459 views
Skip to first unread message

Jens Schauder

unread,
Dec 3, 2010, 1:51:03 PM12/3/10
to scalatest-users
I have a class with several features in in it. I than added another
one and tried to make it pending, since I didn't thought of any
features yet:


feature("a user can do something really cool"){
pending
}

This didn't work at all. Instead of reporting a pending test the test
class threw a PendingTestException, without executing ( or at least
without reporting) all the other test (i.e. scenarios).

Is there any fundamentally wrong with what I did (apart from that it
does not work)?
Couldn't / shouldn't a Feature that aborts with a PendingTestException
be considered a Pending test?

Bill Venners

unread,
Dec 3, 2010, 4:33:34 PM12/3/10
to scalate...@googlegroups.com
Hi Jens,

In a FeatureSpec, features are major ideas, which are divided into
scenarios, which are smaller ideas that make up the feature. So a
features is made up of scenarios. The problem you're having is trying
to make an entire feature pending. That indeed won't work. You need to
put some scenarios in there and those you can make pending, like:

feature("a user can do something really cool") {

scenario("the user creates a brand new cool thing") (pending)
scenario("the user delets his or her cool thing") (pending)
}

Bill

> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to scalate...@googlegroups.com
> To unsubscribe from this group, send email to
> scalatest-use...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
> http://www.artima.com/scalatest
>

--
Bill Venners
Artima, Inc.
http://www.artima.com

Reply all
Reply to author
Forward
0 new messages