rspec-nagios-formatter 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/bin/check_rspec +8 -1
- data/features/check_rspec/run.feature +12 -0
- data/lib/rspec/nagios/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7640c3e6b0a04f313e1d7af013b74a8edaf1655
|
4
|
+
data.tar.gz: 4079732f36f692b24b75b73fb3f83637afab54a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 400ca594178a95806bd8da013f56687c97958c38359d7888ca6588a9a1dca2a23c893e7f85aa867631c1bc84831e55a03c96ae940652cb225c648b17a50cf368
|
7
|
+
data.tar.gz: 5ffc5ba0c9ec4c8975f8a55cabad6b31394c329749d230aa68e474a7cc34e0022a2114fcc6cce5a752d690231f5ef814dde3da4624bbe9c31b2f56afc5ee20e1
|
data/bin/check_rspec
CHANGED
@@ -36,7 +36,14 @@ rescue Timeout::Error
|
|
36
36
|
exit EXIT_CRITICAL
|
37
37
|
end
|
38
38
|
|
39
|
-
|
39
|
+
if cmd_stdout.length > 0
|
40
|
+
puts cmd_stdout
|
41
|
+
else
|
42
|
+
# if nothing was output on stdout, print the first line of stderr
|
43
|
+
puts "RSPEC Critical - #{cmd_stderr.split("\n")[0]}"
|
44
|
+
exit EXIT_CRITICAL
|
45
|
+
end
|
46
|
+
|
40
47
|
unless cmd_status.exitstatus == 0
|
41
48
|
exit EXIT_CRITICAL
|
42
49
|
end
|
@@ -29,3 +29,15 @@ Scenario: run a failing rspec test
|
|
29
29
|
"""
|
30
30
|
^RSPEC Critical - 1 example, 1 failures, finished in 0.\d+ seconds | examples=1 passing=0 failures=1 pending=0 conformance=0% time=0.\d+s$
|
31
31
|
"""
|
32
|
+
|
33
|
+
Scenario: rspec dies
|
34
|
+
Given a file named "trivial_spec.rb" with:
|
35
|
+
"""
|
36
|
+
raise RuntimeError
|
37
|
+
"""
|
38
|
+
When I run `check_rspec trivial_spec.rb`
|
39
|
+
Then the exit status should be 2
|
40
|
+
And it should fail with regexp:
|
41
|
+
"""
|
42
|
+
^RSPEC Critical -.+RuntimeError.+$
|
43
|
+
"""
|
data/lib/rspec/nagios/version.rb
CHANGED