cucumber-nagios 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cucumber/formatter/nagios.rb +25 -8
- data/lib/generators/project/Gemfile +1 -1
- metadata +2 -2
@@ -12,16 +12,20 @@ module Cucumber
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
record_result(status, :step_match => step_match)
|
16
|
+
end
|
17
|
+
|
18
|
+
def before_examples(*args)
|
19
|
+
@header_row = true
|
20
|
+
end
|
21
|
+
|
22
|
+
def after_table_row(table_row)
|
23
|
+
unless @header_row
|
24
|
+
record_result(table_row.status) if table_row.respond_to?(:status)
|
22
25
|
end
|
26
|
+
@header_row = false if @header_row
|
23
27
|
end
|
24
|
-
|
28
|
+
|
25
29
|
def after_features(steps)
|
26
30
|
print_summary
|
27
31
|
end
|
@@ -42,6 +46,19 @@ module Cucumber
|
|
42
46
|
@io.print(message)
|
43
47
|
@io.flush
|
44
48
|
end
|
49
|
+
|
50
|
+
def record_result(status, opts={})
|
51
|
+
step_match = opts[:step_match] || true
|
52
|
+
case status
|
53
|
+
when :passed
|
54
|
+
@passed << step_match
|
55
|
+
when :failed
|
56
|
+
@failed << step_match
|
57
|
+
when :undefined
|
58
|
+
@warning << step_match
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
45
62
|
|
46
63
|
end
|
47
64
|
end
|