[rspec-users] Cucumber: pending specs
dchelimsky at gmail.com
Wed Sep 17 09:58:32 EDT 2008
On Wed, Sep 17, 2008 at 8:52 AM, Chris Flipse <cflipse at gmail.com> wrote:
> I'm finding another case where I'll get unintended breaks, and it's not so
> easy to avoid as adding a PENDING to the end of a step matcher.
> Scenario: none of these are pending
> Given a completed feature # green
> When I submit a bad create post # green
> Then I should see an error message # green
> Scenario: There is no matcher for the When
> Given a feature in work # green
> When I submit a bad update # yellow, unmatched
> Then I should see an error message # red
> Basically, an unmatched step doesn't stop the rest of the steps from
> running, and the Then matcher fails. I end up having to drop some kind of
> nasty blocker inside the .feature file in order to avoid that fail, and
> remember to take it out when I actually implement the second When step ...
> It's a tough thing though, because I can think of other cases where I'm glad
> that a single unmatched step doesn't halt the whole chain. Thinking about
> it though, I'd say it comes down to which type of step it is. If a When is
> unimplemented, the whole chain should stop. If a Then is unimplemented,
> just skip it ...
> On Wed, Sep 17, 2008 at 3:37 AM, Matt Wynne <matt at mattwynne.net> wrote:
>> We found that we can raise a Cucumber::Pending error in the step matcher
>> to achieve the same effect, though in practice we're tending to just write
>> PENDING in the feature and break the link to the step matcher.
>> Actually something that would really help us is the ability to comment out
>> scenarios, as you quite often have code you want to check in but you don't
>> want to break the build due to a half-finished feature. I'm finding I spend
>> a lot longer between check-ins since I started using cucumber in earnest,
>> and that can't be a good thing.
>> Maybe just altering that behaviour where the scenario carries on running
>> when a Given step fails would help. Aslak you never explained why you
>> designed it like that - how does it help with your workflow?
>> On 17 Sep 2008, at 02:20, David Chelimsky wrote:
>>> On Tue, Sep 16, 2008 at 8:16 PM, Scott Taylor
>>> <mailing_lists at railsnewbie.com> wrote:
>>>> Shouldn't pending 'a message' work in cucumber? Is this a bug?
>>>> it's raising Rspec's PendingExpectationError.
>>> This came up last week:
>>> Didn't really get resolved.
>>> Go ahead and put a ticket in lighthouse if you want (under cucumber
>>> project: http://rspec.lighthouseapp.com/projects/16211).
>>> rspec-users mailing list
>>> rspec-users at rubyforge.org
>> 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
> // anything worth taking seriously is worth making fun of
> // http://blog.devcaffeine.com/
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users