From c273d91df13227f04908198ff91df01cf7c2d284 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 4 Jan 2016 12:08:02 -0800 Subject: [PATCH] cucumber: fix issue where an undefined step would cause an exception --- features/step_definitions/jekyll_steps.rb | 4 ++-- features/support/overview.rb | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/features/step_definitions/jekyll_steps.rb b/features/step_definitions/jekyll_steps.rb index 9164d549..b38397fb 100644 --- a/features/step_definitions/jekyll_steps.rb +++ b/features/step_definitions/jekyll_steps.rb @@ -150,14 +150,14 @@ end When /^I run jekyll(.*)$/ do |args| status = run_jekyll(args) if args.include?("--verbose") || ENV['DEBUG'] - puts jekyll_run_output + STDERR.puts "\n#{jekyll_run_output}\n" end end When /^I run bundle(.*)$/ do |args| status = run_bundle(args) if args.include?("--verbose") || ENV['DEBUG'] - puts jekyll_run_output + STDERR.puts "\n#{jekyll_run_output}\n" end end diff --git a/features/support/overview.rb b/features/support/overview.rb index 9550969b..9045eafb 100644 --- a/features/support/overview.rb +++ b/features/support/overview.rb @@ -25,6 +25,7 @@ module Features @indent = 0 @prefixes = options[:prefixes] || {} @delayed_messages = [] + @snippets_input = [] end def before_features(features) @@ -115,6 +116,10 @@ module Features @io.flush end + def after_test_step(test_step, result) + collect_snippet_data(test_step, result) + end + private def print_feature_element_name(keyword, name, file_colon_line, source_indent)