From f11c5d87df20aa1b6b5c940844fa4e8cfab42b9e Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 9 Jun 2013 12:04:54 +0100 Subject: Add test for story step outside of story --- yarnlib/block_parser_tests.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'yarnlib') 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 -- cgit v1.2.1