Class Index [+]

Quicksearch

Cucumber::Formatter::Summary

Public Instance Methods

scenario_summary(step_mother, &block) click to toggle source
   # File lib/cucumber/formatter/summary.rb, line 5
5:       def scenario_summary(step_mother, &block)
6:         scenarios_proc = lambda{|status| step_mother.scenarios(status)}
7:         dump_count(step_mother.scenarios.length, "scenario") + dump_status_counts(scenarios_proc, &block)
8:       end
step_summary(step_mother, &block) click to toggle source
    # File lib/cucumber/formatter/summary.rb, line 10
10:       def step_summary(step_mother, &block)
11:         steps_proc = lambda{|status| step_mother.steps(status)}
12:         dump_count(step_mother.steps.length, "step") + dump_status_counts(steps_proc, &block)
13:       end

Private Instance Methods

dump_count(count, what, state=nil) click to toggle source
    # File lib/cucumber/formatter/summary.rb, line 29
29:       def dump_count(count, what, state=nil)
30:         [count, state, "#{what}#{count == 1 ? '' : 's'}"].compact.join(" ")
31:       end
dump_status_counts(find_elements_proc) click to toggle source
    # File lib/cucumber/formatter/summary.rb, line 17
17:       def dump_status_counts(find_elements_proc)
18:         counts = [:failed, :skipped, :undefined, :pending, :passed].map do |status|
19:           elements = find_elements_proc.call(status)
20:           elements.any? ? yield("#{elements.length} #{status.to_s}", status) : nil
21:         end.compact
22:         if counts.any?
23:           " (#{counts.join(', ')})"
24:         else
25:           ""
26:         end
27:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.