[rspec-users] [Cucumber] Fail a scenario from After or AfterStep

aslak hellesoy aslak.hellesoy at gmail.com
Wed May 20 03:26:19 EDT 2009


> On May 19, 2009, at 10:43 PM, Luke Melia wrote:
>
>> On May 19, 2009, at 7:04 PM, aslak hellesoy wrote:
>>
>>> I'm convinced. We'll add an AfterStep hook. Do you want to give a stab
>>> at a patch? Start by writing a feature - see
>>> features/after_block_exceptions.feature for a good example of the
>>> style we like...
>>
>> Sounds good. I'll give it a whirl tonight.
>
> Here's my first pass:
>
> http://github.com/weplay/cucumber/commit/39601bc5eb6f0761dd7bedddc5484cdd895ca787
>
> Not crazy about the way it tracks the current_scenario or the
> exception_fails_scenario parameter on Hook#execute_in. Unlike Before and
> After hooks, I think it's preferable for AfterStep to fail the step than to
> call scenario.fail!
>

I agree - I'm not crazy about those small hacks you did, but
completely understand why you did it. I'd probably have done the same
myself. Some refactorings are needed in order to make this cleaner.
They are small enough hacks that I'll pull it in :-)

Aslak

> Thoughts?
>
> Cheers,
> Luke
> --
> Luke Melia
> luke at lukemelia.com
> http://www.lukemelia.com/
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list