Class: Specjour::Cucumber::FinalReport
- Inherits:
-
Object
- Object
- Specjour::Cucumber::FinalReport
- Includes:
- Cucumber::Formatter::Console
- Defined in:
- lib/specjour/cucumber/final_report.rb
Instance Method Summary collapse
- #add(stats) ⇒ Object
- #exit_status ⇒ Object
-
#initialize ⇒ FinalReport
constructor
A new instance of FinalReport.
- #summarize ⇒ Object
Constructor Details
#initialize ⇒ FinalReport
Returns a new instance of FinalReport.
49 50 51 52 |
# File 'lib/specjour/cucumber/final_report.rb', line 49 def initialize @features = [] @summarizer = Summarizer.new end |
Instance Method Details
#add(stats) ⇒ Object
54 55 56 |
# File 'lib/specjour/cucumber/final_report.rb', line 54 def add(stats) @summarizer.add(stats) end |
#exit_status ⇒ Object
58 59 60 |
# File 'lib/specjour/cucumber/final_report.rb', line 58 def exit_status @summarizer.failing_scenarios.empty? end |
#summarize ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/specjour/cucumber/final_report.rb', line 62 def summarize if @summarizer.failing_scenarios.any? puts "\n\n" @summarizer.step_summary.each {|f| puts f } puts "\n\n" puts format_string("Failing Scenarios:", :failed) @summarizer.failing_scenarios.each {|f| puts f } end default_format = lambda {|status_count, status| format_string(status_count, status)} puts puts scenario_summary(@summarizer, &default_format) puts step_summary(@summarizer, &default_format) puts format_duration(@summarizer.duration) if @summarizer.duration end |