[rspec-users] [Cucumber] Fail a scenario from After or AfterStep
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:
> 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 :-)
> Luke Melia
> luke at lukemelia.com
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users