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



29
30
31
# File 'lib/cucumber/formatter/nagios.rb', line 29

def after_features(steps)
  print_summary
end

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



14
15
16
# File 'lib/cucumber/formatter/nagios.rb', line 14

def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
  record_result(status, :step_match => step_match)
end

#after_table_row(table_row) ⇒ Object



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

def after_table_row(table_row)
  unless @header_row
    record_result(table_row.status) if table_row.respond_to?(:status)
  end
  @header_row = false if @header_row
end

#before_examples(*args) ⇒ Object



18
19
20
# File 'lib/cucumber/formatter/nagios.rb', line 18

def before_examples(*args)
  @header_row = true
end