diff --git a/lib/cucumber/formatter/html.rb b/lib/cucumber/formatter/html.rb index 5d60e032b0..f31753f4ff 100644 --- a/lib/cucumber/formatter/html.rb +++ b/lib/cucumber/formatter/html.rb @@ -268,6 +268,7 @@ def step_name(keyword, step_match, status, source_indent, background, file_colon end def exception(exception, status) + return if @hide_this_step build_exception_detail(exception) end diff --git a/spec/cucumber/formatter/html_spec.rb b/spec/cucumber/formatter/html_spec.rb index 7c159e028c..b99c8d5c0b 100644 --- a/spec/cucumber/formatter/html_spec.rb +++ b/spec/cucumber/formatter/html_spec.rb @@ -211,7 +211,7 @@ module Formatter it { @doc.should have_css_node('.feature .scenario .step.failed .message', /StandardError/) } end - describe "with a step that fails in the backgound" do + describe "with a step that fails in the background" do define_steps do Given(/boo/) { raise 'eek' } end @@ -227,6 +227,8 @@ module Formatter it { @doc.should have_css_node('.feature .background .step.failed', /eek/) } it { @doc.should_not have_css_node('.feature .scenario .step.failed', //) } it { @doc.should have_css_node('.feature .scenario .step.undefined', /yay/) } + it { @doc.should have_css_node('.feature .background .backtrace', //) } + it { @doc.should_not have_css_node('.feature .scenario .backtrace', //) } end describe "with a step that embeds a snapshot" do