Crash!/
end
it "shows exception backtraces" do
html.should match 'features/3_failed_background.feature:7:in `Given a Background Step fails''
html.should match '3_failed_background.feature:7:in `Given a Background Step'
end
it "shows exception source snippets" do
html.should match '6<\/span>'
html.should match 'raise "Crash!'
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 running time" do
html.should match /Duration: \d+\':\d+\'\'<\/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
it "contains essential information in the status bar" do
html.should match 'Cucumber Features
'
html.should match 'Cuukie'
end
it "shows a green status bar if all scenarios passed" do
run_cucumber '1_show_scenarios.feature:9'
html.should match /passedColors\('cucumber-header'\)/
end
it "shows a red status bar if any scenario failed" do
run_cucumber '1_show_scenarios.feature'
html.should match /failedColors\('cucumber-header'\)/
end
it "shows a yellow status bar 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