Class: Cucumber::Formatter::Nagios

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatter/nagios.rb

Instance Method Summary collapse

Constructor Details

#initialize(step_mother, io, options = {}) ⇒ Nagios

Returns a new instance of Nagios.



7
8
9
10
11
12
# File 'lib/cucumber/formatter/nagios.rb', line 7

def initialize(step_mother, io, options={})
  @failed  = []
  @passed  = []
  @warning = []
  @io = io
end

Instance Method Details

#after_features(steps) ⇒ Object



25
26
27
# File 'lib/cucumber/formatter/nagios.rb', line 25

def after_features(steps)
  print_summary
end

#after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/cucumber/formatter/nagios.rb', line 14

def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
  case status
  when :passed
    @passed << step_match
  when :failed
     @failed << step_match
  when :undefined
    @warning << step_match
  end
end