[rspec-users] cucumber - mark a step as pending

Matt Wynne matt at mattwynne.net
Tue Sep 9 13:52:06 EDT 2008


Yeah the trouble is it fails with the following error:

Spec::Example::ExamplePendingError

Which cucumber doesn't understand as anything other than a complete  
fail.

Our workaround we've arrived at (thanks Aslak for pointing out the  
obvious that we'd missed!) is to just write PENDING at the end of the  
regex for the step matcher so it doesn't match on the step in the  
feature file.

@Aslak - Interestingly, when we do this and make the Given step  
pending, cuc still tries to run the When / Then steps for that  
scenario. Sounds like a bug to me - should we raise a ticket on  
lighthouse or did I miss something?


On 9 Sep 2008, at 18:16, David Chelimsky wrote:

> Aslak - I think Matt is looking for this:
>
> Given /blah/ do
>   pending
> end
>
> Matt - I'm pretty sure that will work - give it a shot, OK?
>
> On Tue, Sep 9, 2008 at 12:09 PM, Aslak Hellesøy
> <aslak.hellesoy at gmail.com> wrote:
>> A plain text step with no matching step definition is pending.
>>
>> Sent from my iPhone
>>
>> On 9. sep.. 2008, at 19.05, "David Chelimsky"  
>> <dchelimsky at gmail.com> wrote:
>>
>>> Have you tried?
>>>
>>> On Tue, Sep 9, 2008 at 12:01 PM, Matt Wynne <matt at mattwynne.net>  
>>> wrote:
>>>>
>>>> I love the way I can throw a call to pending() in the top of an
>>>> unfinished
>>>> RSpec example and stop it from failing the build.
>>>> Is there a similar way to do such a thing with good ole' cucumber?
>>>>
>>>> cheers,
>>>> Matt
>>>> ----
>>>> http://blog.mattwynne.net
>>>> http://songkick.com
>>>> In case you wondered: The opinions expressed in this email are  
>>>> my own and
>>>> do
>>>> not necessarily reflect the views of any former, current or future
>>>> employers
>>>> of mine.
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> rspec-users mailing list
>>>> rspec-users at rubyforge.org
>>>> http://rubyforge.org/mailman/listinfo/rspec-users
>>>>
>>> _______________________________________________
>>> rspec-users mailing list
>>> rspec-users at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

cheers,
Matt
----
http://blog.mattwynne.net
http://songkick.com

In case you wondered: The opinions expressed in this email are my own  
and do not necessarily reflect the views of any former, current or  
future employers of mine.





More information about the rspec-users mailing list