test_notifier 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,13 +3,15 @@ require "test_notifier"
3
3
  Autotest.add_hook :ran_command do |at|
4
4
  begin
5
5
  content = at.results.to_s
6
+
6
7
  rspec_matches = content.match(/(\d+) examples?, (\d+) failures?(, (\d+) pendings?)?/)
7
8
  test_unit_matches = content.match(/(\d+) tests, (\d+) assertions, (\d+) failures, (\d+) errors/)
8
9
 
9
10
  if rspec_matches
10
- _, examples, failures, pending = *rspec_matches
11
+ _, examples, failures, _, pending = *rspec_matches
11
12
  status = failures.to_i > 0 ? :fail : :success
12
- message = "#{examples} examples, #{failures} failed, #{pending} pending"
13
+ message = "#{examples} examples, #{failures} failed"
14
+ message << ", #{pending} pending" if pending
13
15
  TestNotifier.notify(:status => status, :message => message) unless examples.to_i.zero?
14
16
  elsif test_unit_matches
15
17
  _, tests, assertions, failures, errors = *test_unit_matches
@@ -2,7 +2,7 @@ module TestNotifier
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 0
5
+ PATCH = 1
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_notifier
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nando Vieira
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-26 00:00:00 -03:00
18
+ date: 2010-08-22 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies: []
21
21