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
13
14
# File 'lib/cucumber/formatter/nagios.rb', line 7

def initialize(step_mother, io, options={})
  @failed  = []
  @passed  = []
  @warning = []
  @io = io
  @message = []
  @start_time = Time.now
end

Instance Method Details

#after_features(steps) ⇒ Object



31
32
33
# File 'lib/cucumber/formatter/nagios.rb', line 31

def after_features(steps)
  print_summary
end

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



16
17
18
# File 'lib/cucumber/formatter/nagios.rb', line 16

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

#after_table_row(table_row) ⇒ Object



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

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



20
21
22
# File 'lib/cucumber/formatter/nagios.rb', line 20

def before_examples(*args)
  @header_row = true
end

#scenario_name(keyword, name, file_colon_line, source_indent) ⇒ Object



35
36
37
# File 'lib/cucumber/formatter/nagios.rb', line 35

def scenario_name(keyword, name, file_colon_line, source_indent)
  @scenario_file_colon_line = file_colon_line
end