rrrspec-cucumber2 1.0.4 → 1.0.5
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/lib/rrrspec/cucumber2/cucumber_runner.rb +8 -11
- data/lib/rrrspec/cucumber2/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: 6e1b220916705e2b3f4a94e956b368e20e058c68
|
4
|
+
data.tar.gz: a1d68778cfe84f7ac9baed2fd9fc55790f675787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de79043ef91b7028ee31ac8b0259604513ae06977fc7d0f46158c1a3a107f92c5a040f51663fff9867185204233e1580c2ac23c22a60b92286dbab36094f9568
|
7
|
+
data.tar.gz: 81dc4f628ef0b64e70c092e2f5c19473b26070a2fd8dfc93204bb5936bedcd878dda1a65b96f99b6d23b58be6ca160f543f43a57c2377e1f5150065c8cbc41b1
|
@@ -10,21 +10,23 @@ module RRRSpec
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def run(*formatters)
|
13
|
-
status =
|
13
|
+
status = false
|
14
|
+
result_err = ''
|
14
15
|
|
15
16
|
begin
|
16
|
-
|
17
|
+
result_out = `SLAVE_NUMBER=#{ENV['SLAVE_NUMBER']} bundle exec cucumber #{@file_path}`
|
17
18
|
|
18
19
|
formatters.each do |formatter_class|
|
19
20
|
formatter = formatter_class.new nil
|
20
|
-
|
21
|
+
process_result(formatter, result_out)
|
21
22
|
end
|
23
|
+
|
24
|
+
status = true
|
22
25
|
rescue Exception => e
|
23
|
-
|
24
|
-
puts e.message
|
26
|
+
result_err = e.message
|
25
27
|
end
|
26
28
|
|
27
|
-
[status,
|
29
|
+
[status, result_out, result_err]
|
28
30
|
end
|
29
31
|
|
30
32
|
def reset
|
@@ -32,15 +34,12 @@ module RRRSpec
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def process_result(formatter, result)
|
35
|
-
status = true
|
36
|
-
|
37
37
|
penultimate_idx = result.lines.count - 2
|
38
38
|
penultimate_line = result.lines[penultimate_idx]
|
39
39
|
|
40
40
|
if penultimate_line.match(/(\d+) failed/)
|
41
41
|
n = penultimate_line.match(/(\d+) failed/)[1].to_i
|
42
42
|
(1..n).each { formatter.example_failed nil }
|
43
|
-
status = false
|
44
43
|
end
|
45
44
|
|
46
45
|
if penultimate_line.match(/(\d+) skipped/)
|
@@ -52,8 +51,6 @@ module RRRSpec
|
|
52
51
|
n = penultimate_line.match(/(\d+) passed/)[1].to_i
|
53
52
|
(1..n).each { formatter.example_passed nil}
|
54
53
|
end
|
55
|
-
|
56
|
-
status
|
57
54
|
end
|
58
55
|
|
59
56
|
end
|