summaryrefslogtreecommitdiff
path: root/yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarn')
-rwxr-xr-xyarn6
1 files changed, 6 insertions, 0 deletions
diff --git a/yarn b/yarn
index 3e9be0d..a84fcd4 100755
--- a/yarn
+++ b/yarn
@@ -109,6 +109,7 @@ class YarnRunner(cliapp.Application):
'step %Index(step,steps): %String(step_name)')
scenarios, implementations = self.parse_scenarios(args)
+ self.check_there_are_scenarios(scenarios)
self.check_for_duplicate_scenario_names(scenarios)
self.check_for_thens(scenarios)
self.connect_implementations(scenarios, implementations)
@@ -160,6 +161,11 @@ class YarnRunner(cliapp.Application):
return block_parser.scenarios, block_parser.implementations
+ def check_there_are_scenarios(self, scenarios):
+ if not scenarios:
+ raise cliapp.AppException(
+ 'There are no scenarios; must have at least one.')
+
def check_for_duplicate_scenario_names(self, scenarios):
counts = collections.Counter()
for s in scenarios: