cucumber-nagios 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- case status
16
- when :passed
17
- @passed << step_match
18
- when :failed
19
- @failed << step_match
20
- when :undefined
21
- @warning << step_match
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
@@ -1,6 +1,6 @@
1
1
  # list of dependencies for a cucumber-nagios project
2
2
 
3
- #gem "bundler", "0.6.0"
3
+ gem "cucumber-nagios", "0.7.0"
4
4
  gem "cucumber", "0.6.1"
5
5
  gem "rspec", "1.3.0"
6
6
  gem "webrat", "0.7.0"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 0
9
- version: 0.7.0
8
+ - 1
9
+ version: 0.7.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lindsay Holmwood