test_notifier 0.2.0 → 0.2.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.
@@ -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
|
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
|
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
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-
|
18
|
+
date: 2010-08-22 00:00:00 -03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|