jasmine-headless-webkit/features/steps/then/reporting/report_should_have.rb

8 lines
330 B
Ruby
Raw Normal View History

2011-12-29 23:37:23 +00:00
Then /^the report file "(.*)" should have (\d+) total, (\d+) failures?, (no|yes) console usage$/ do |file, total, failures, console_usage|
report = Jasmine::Headless::Report.load(file)
report.total.should == total.to_i
report.failed.should == failures.to_i
report.has_used_console?.should == (console_usage == 'yes')
end