make demo more expressive
This commit is contained in:
parent
2428de10ed
commit
d44c8080bf
2 changed files with 23 additions and 6 deletions
|
|
@ -3,8 +3,25 @@ Feature: Serve coffee
|
||||||
Coffee should not be served until the button has been pressed
|
Coffee should not be served until the button has been pressed
|
||||||
If there is no coffee left then money should be refunded
|
If there is no coffee left then money should be refunded
|
||||||
|
|
||||||
|
Scenario Outline: Eating
|
||||||
|
Given there are <start> cucumbers
|
||||||
|
When I eat <eat> cucumbers
|
||||||
|
Then I should have <left> cucumbers
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| start | eat | left |
|
||||||
|
| 12 | 5 | 7 |
|
||||||
|
| 20 | 5 | 15 |
|
||||||
|
|
||||||
Scenario: Buy last coffee
|
Scenario: Buy last coffee
|
||||||
Given there are 1 coffees left in the machine
|
Given there are 1 coffees left in the machine
|
||||||
And I have deposited 1$
|
And I have deposited 1$
|
||||||
When I press the coffee button
|
When I press the coffee button
|
||||||
Then I should be served a coffee
|
Then I should be served a "coffee"
|
||||||
|
|
||||||
|
# this a comment
|
||||||
|
|
||||||
|
"""
|
||||||
|
this is a
|
||||||
|
pystring
|
||||||
|
"""
|
||||||
|
|
@ -33,7 +33,7 @@ oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
|
||||||
if (state == "start") {
|
if (state == "start") {
|
||||||
if (line.match("Scenario:|Feature:|Scenario\ Outline:")) {
|
if (line.match("Scenario:|Feature:|Scenario\ Outline:|Background:")) {
|
||||||
indent += space2;
|
indent += space2;
|
||||||
} else if(line.match("(Given|Then).+(:)$|Examples:")) {
|
} else if(line.match("(Given|Then).+(:)$|Examples:")) {
|
||||||
indent += space2;
|
indent += space2;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue