summaryrefslogtreecommitdiff
path: root/yarnlib/block_parser_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'yarnlib/block_parser_tests.py')
-rw-r--r--yarnlib/block_parser_tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py
index 77a96e1..0b0c661 100644
--- a/yarnlib/block_parser_tests.py
+++ b/yarnlib/block_parser_tests.py
@@ -32,20 +32,22 @@ class BlockParserTests(unittest.TestCase):
def test_parses_simple_elements(self):
self.parser.parse_blocks(
- ['STORY foo', 'GIVEN bar', 'WHEN foobar\nTHEN yoyo'])
+ ['STORY foo', 'GIVEN bar', 'WHEN foobar\nTHEN yoyo\nFINALLY yay'])
self.assertEqual(len(self.parser.stories), 1)
self.assertEqual(len(self.parser.implementations), 0)
story = self.parser.stories[0]
self.assertEqual(story.name, 'foo')
- self.assertEqual(len(story.steps), 3)
+ self.assertEqual(len(story.steps), 4)
self.assertEqual(story.steps[0].what, 'GIVEN')
self.assertEqual(story.steps[0].text, 'bar')
self.assertEqual(story.steps[1].what, 'WHEN')
self.assertEqual(story.steps[1].text, 'foobar')
self.assertEqual(story.steps[2].what, 'THEN')
self.assertEqual(story.steps[2].text, 'yoyo')
+ self.assertEqual(story.steps[3].what, 'FINALLY')
+ self.assertEqual(story.steps[3].text, 'yay')
def test_normalises_whitespace(self):
self.parser.parse_blocks(['STORY foo bar '])