make demo more expressive

This commit is contained in:
Patrick Nevels 2014-01-25 20:03:49 -06:00
commit d44c8080bf
2 changed files with 23 additions and 6 deletions

View file

@ -1,10 +1,27 @@
Feature: Serve coffee
Coffee should not be served until paid for
Coffee should not be served until the button has been pressed
If there is no coffee left then money should be refunded
Coffee should not be served until paid for
Coffee should not be served until the button has been pressed
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
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
Then I should be served a coffee
Then I should be served a "coffee"
# this a comment
"""
this is a
pystring
"""

View file

@ -33,7 +33,7 @@ oop.inherits(Mode, TextMode);
if (state == "start") {
if (line.match("Scenario:|Feature:|Scenario\ Outline:")) {
if (line.match("Scenario:|Feature:|Scenario\ Outline:|Background:")) {
indent += space2;
} else if(line.match("(Given|Then).+(:)$|Examples:")) {
indent += space2;