Crash!<\/pre><\/div>/
end
it "shows exception backtraces" do
html.should match 'backtrace">./features/step_definitions/main_steps.rb:8:in `/I do'
html.should match '3_failed_background.feature:7:in `Given I do'
end
it "shows exception source snippets" do
html.should match '6<\/span>'
html.should match 'I do something'
end
it "marks the exception source in snippets" do
html.should match '8<\/span> raise'
end
it "escapes HTML output" do
html.should match 'I pass an "argument"'
end
it "shows tables in steps" do
html.should match 'x | '
html.should match '22 | '
end
it "shows multiline strings in steps" do
html.should match ' Cuukie is sweet!\n Let's try it out.
'
end
it "shows total duration" do
html.should match /Finished in \d+m\d+\.\d+s seconds<\/strong>/
end
it "shows end-of-features stats" do
run_cucumber '1_show_scenarios.feature'
html.should match /3 scenarios \(1 failed, 1 pending, 1 passed\)/
html.should match /11 steps \(1 failed, 2 skipped, 1 pending, 7 passed\)/
end
end
describe 'in the page header' do
it "contains essential information" do
run_cucumber
html.should match 'Cucumber Features
'
html.should match 'Cuukie'
end
it "shows green if all scenarios passed" do
run_cucumber '1_show_scenarios.feature:9'
html.should match /passedColors\('cucumber-header'\)/
end
it "shows red if any scenario failed" do
run_cucumber '1_show_scenarios.feature'
html.should match /failedColors\('cucumber-header'\)/
end
it "shows yellow if no scenarios failed but some are pending" do
run_cucumber '1_show_scenarios.feature:19'
html.should match /pendingColors\('cucumber-header'\)/
end
end
end