cucumber_growlnotify 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.2.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cucumber_growlnotify}
8
- s.version = "0.1.3"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rodrigo Oliveira"]
12
- s.date = %q{2011-03-10}
12
+ s.date = %q{2011-03-11}
13
13
  s.description = %q{This gem notifies through growl that your cucumber tests are passing or not}
14
14
  s.email = %q{rodrigo.dealer@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -25,6 +25,9 @@ module Cucumber
25
25
  @prefixes = options[:prefixes] || {}
26
26
  @delayed_announcements = []
27
27
  @passed = 0
28
+ @skipped = 0
29
+ @pending = 0
30
+ @undefined = 0
28
31
  @failure = 0
29
32
  @scenarios = 0
30
33
  end
@@ -152,10 +155,17 @@ module Cucumber
152
155
  source_indent = nil unless @options[:source]
153
156
  name_to_report = format_step(keyword, step_match, status, source_indent)
154
157
  @io.puts(name_to_report.indent(@scenario_indent + 2))
155
- if status == :passed
156
- @passed += 1
157
- else
158
- @failure += 1
158
+ case status
159
+ when :passed
160
+ @passed += 1
161
+ when :failed
162
+ @failure += 1
163
+ when :skipped
164
+ @skipped += 1
165
+ when :undefined
166
+ @undefined += 1
167
+ when :pending
168
+ @pending += 1
159
169
  end
160
170
  print_announcements
161
171
  end
@@ -242,11 +252,30 @@ module Cucumber
242
252
  print_stats(features, @options.custom_profiles)
243
253
  print_snippets(@options)
244
254
  print_passing_wip(@options)
245
- message = @scenarios.to_s + " scenarios \n" + @passed.to_s + " steps passed \n" + @failure.to_s + " steps failed"
255
+ message = @scenarios.to_s + " scenarios \n"
246
256
  image = IMAGES[:success]
247
- if (@failure > 0)
257
+ if @passed > 0
258
+ message = message + @passed.to_s + " steps passed \n"
259
+ end
260
+
261
+ if @failure > 0
262
+ message = message + @failure.to_s + " steps failed\n"
263
+ image = IMAGES[:fail]
264
+ end
265
+
266
+ if @pending > 0
267
+ message = message + @pending.to_s + " steps pending\n"
268
+ end
269
+
270
+ if @undefined > 0
271
+ message = message + @undefined.to_s + " steps undefined\n"
272
+ end
273
+
274
+ if @skipped > 0
275
+ message = message + @skipped.to_s + " steps skipped\n"
248
276
  image = IMAGES[:fail]
249
277
  end
278
+
250
279
  growl('Cucumber', message, image)
251
280
  end
252
281
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cucumber_growlnotify
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rodrigo Oliveira
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-10 00:00:00 -03:00
13
+ date: 2011-03-11 00:00:00 -03:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -83,7 +83,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
- hash: 2875415526136391446
86
+ hash: -3877262625336569524
87
87
  segments:
88
88
  - 0
89
89
  version: "0"