Skip to content

Commit

Permalink
Merge pull request #523 from mlex/html-formatter-bad-backtrace-for-fa…
Browse files Browse the repository at this point in the history
…iling-background

Fixed #522: Do not print superfluous and badly formatted backtrace when ...
  • Loading branch information
os97673 committed Sep 3, 2013
2 parents b826327 + 3cc8b75 commit 25378dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/cucumber/formatter/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion spec/cucumber/formatter/html_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 25378dd

Please sign in to comment.