Class: Nagios::NagiosFormatter

Inherits:
Cucumber::Ast::Visitor
  • Object
show all
Defined in:
lib/generators/project/features/support/nagios.rb

Instance Method Summary collapse

Constructor Details

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



3
4
5
6
7
# File 'lib/generators/project/features/support/nagios.rb', line 3

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

Instance Method Details

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



9
10
11
12
13
14
15
16
17
# File 'lib/generators/project/features/support/nagios.rb', line 9

def visit_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
  super
  case status
    when :passed
      @passed << step_match
    when :failed
      @failed << step_match
  end
end

#visit_steps(steps) ⇒ Object



19
20
21
22
# File 'lib/generators/project/features/support/nagios.rb', line 19

def visit_steps(steps)
  super
  print_summary
end