summaryrefslogtreecommitdiff
path: root/yarnlib
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-06-09 12:04:54 +0100
committerLars Wirzenius <liw@liw.fi>2013-06-09 12:04:54 +0100
commitf11c5d87df20aa1b6b5c940844fa4e8cfab42b9e (patch)
treea4c2b583d2db54747eb7c02f56b67ee04a2011f3 /yarnlib
parent784e8f70e7c95c202937f0403600c44dafd029f6 (diff)
downloadcmdtest-f11c5d87df20aa1b6b5c940844fa4e8cfab42b9e.tar.gz
Add test for story step outside of story
Diffstat (limited to 'yarnlib')
-rw-r--r--yarnlib/block_parser_tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py
index 45bfe67..77a96e1 100644
--- a/yarnlib/block_parser_tests.py
+++ b/yarnlib/block_parser_tests.py
@@ -61,6 +61,12 @@ class BlockParserTests(unittest.TestCase):
self.parser.parse_blocks,
['STORY foo\nblah'])
+ def test_raises_error_for_step_outside_story(self):
+ self.assertRaises(
+ yarnlib.BlockError,
+ self.parser.parse_blocks,
+ ['GIVEN foo'])
+
def test_parses_implements_in_a_block_by_itself(self):
self.parser.parse_blocks(['IMPLEMENTS GIVEN foo\ntrue'])
impls = self.parser.implementations