Frédérick Ros
Senior Manager, aMaDEUS
Dev addict
56%
Software behaviour
must be described
in a user readable manner
Feature
: Division In order to avoid silly mistakes Cashiers must be able to calculate a fractionScenario
: Regular numbersGiven
I have entered 3 into the calculatorAnd
I have entered 2 into the calculatorWhen
I press divideThen
the result should be 1.5 on the screen
Given / When / Then en
Soit / Lorsque / Alors fr
Angenommen / Wenn / Dann de
前提 / もし / ならば ja
...
I CAN HAZ / WEN / DEN en-lol
Scenario
: Regular numbersGiven
I have entered <a number> into the calculatorAnd
I have entered <another number> into the calculatorWhen
I press divideThen
the result should be <result> on the screenExamples
: | a number | another number | result | | 12 | 5 | 7 | | 20 | 5 | 15 |
Background
:Given
a global administrator named "Greg"And
a blog named "Greg's anti-tax rants"And
a customer named "Dr. Bill"And
a blog named "Expensive Therapy" owned by "Dr. Bill"Scenario
: Dr. Bill posts to his own blogGiven
I am logged in as Dr. BillWhen
I try to post to "Expensive Therapy"Then
I should see "Your article was published."
Given I have entered 3 feature
Given
/I have entered (\d+)/do
|number| ## Some ruby codeend
step
Cucumber, c'est bon, mangez-en !