You should probably split that into 2 scenarios. One for finding prime or not, 
and one for throwing if the number is negative.

There might be an else construct, but I would argue that if you need an 
else/but, then you have 2 behaviors in a single scenario.

JD

From: [email protected] 
[mailto:[email protected]] On Behalf Of Mohammad Azam
Sent: Thursday, September 24, 2009 1:07 PM
To: [email protected]
Subject: [Ironruby-core] Is there a But keyword in Cucumber?

I am using Cucumber and now I need to use a But keyword (if there is any)

Scenario Outline: Find if the number if prime or not
Given I have a number
When I pass the <number> to the prime service
Then the service should display <result> indicating whether input is prime or 
not
But if the number is negative
Then the prime service should throw an exception

But it shows up as "Then" and not "But". Is there anything related to "But" in 
Cucumber.


--
Mohammad Azam
MVP (Microsoft Valuable Professional)
www.highoncoding.com<http://www.highoncoding.com>
www.azamsharp.com<http://www.azamsharp.com>
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to