You can use an After hook:
After do |scenario|
exit 1 if scenario.failed?
end
cheers,
Matt
--
Freelance programmer & coach
Author, http://pragprog.com/books/hwcuc/the-cucumber-book (with Aslak Hellesøy)
Founder, http://relishapp.com
+44(0)7974430184 | http://twitter.com/mattwynne
On 19 Jul 2011, at 00:37, planon wrote:
Cucumber keeps executing even after a step definition has failed, and it outputs not only the failing steps, but also the passing ones. What option do I need to use in order to ensure that Cucumber stop executing as soon as it has encountered a failing step? [skipped]
You can use an After hook:
After do |scenario|
exit 1 if scenario.failed?
end
cheers,
Matt
-- DK AIM: DKroot1, Skype: DKroot
Actually, it's this:
After do |scenario|
Cucumber.wants_to_quit = true if scenario.failed?
end
Aslak
> --
> You received this message because you are subscribed to the Google Groups
> "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to
> cukes+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cukes?hl=en.
>
Aslak
On Tue, Aug 2, 2011 at 10:03 AM, Aditya tondon <adity...@gmail.com> wrote:
> Guys
>
> I have a issue , i am new to cucumber, capybara and jruby ,bundle ,
> the company where i work they are using the above mentioned combination to
> test the websites.
>
> My question . : i just to get up to a speed with writing effective step
> definations , for this what should be my approach ?
> is there any book or reference material which i can
> refer ?
>
>
> if i am not asking much ,what would be the use of capybara in this as i am
> quite new to it .
>
> and how much i need to know about the capyabara . can any one provide me a
> live example to help me start implenting it .
>
> The stage where i am right now is :
> a) Have installed above three applications and waiting to try some example
> for a real hands on.
>
>
>
Actually, it's this: After do|scenario|Cucumber.wants_to_quit = true if scenario.failed? end Aslak