rrrspec-cucumber2 1.0.3 → 1.0.4
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 +15 -9
- data/lib/rrrspec/cucumber2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cc1adfcfac5b469bcfb005ca296f707b0a68427
|
4
|
+
data.tar.gz: 9e41aa3af93d0cf7566ffd904e1595ef5d0d8fa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9649356a9a14d899f2791ca0335dd839ba556f082a4e46b3b1fcfd429e4338ba46f31325542c8eab5a0e39011cc2bae8eb8221afede624a7a812ef1c849b155c
|
7
|
+
data.tar.gz: c1f23643db0e9094e29b7a2baeb58a8664fb60a70d4a52a6ae8e9ede3e2acd97a009d9f4823295332233c9db5753467c3cab15e7fbc0b0f7f6c37fb15087dcb8
|
@@ -10,14 +10,17 @@ module RRRSpec
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def run(*formatters)
|
13
|
-
|
14
|
-
|
15
|
-
result = `SLAVE_NUMBER=#{ENV['SLAVE_NUMBER']} bundle exec cucumber #{@file_path}`
|
16
|
-
status = $?.success?
|
13
|
+
status = true
|
17
14
|
|
18
15
|
begin
|
19
|
-
|
16
|
+
result = `SLAVE_NUMBER=#{ENV['SLAVE_NUMBER']} bundle exec cucumber #{@file_path}`
|
17
|
+
|
18
|
+
formatters.each do |formatter_class|
|
19
|
+
formatter = formatter_class.new nil
|
20
|
+
status = process_result(formatter, result)
|
21
|
+
end
|
20
22
|
rescue Exception => e
|
23
|
+
status = false
|
21
24
|
puts e.message
|
22
25
|
end
|
23
26
|
|
@@ -28,8 +31,8 @@ module RRRSpec
|
|
28
31
|
@file_path = ''
|
29
32
|
end
|
30
33
|
|
31
|
-
def
|
32
|
-
|
34
|
+
def process_result(formatter, result)
|
35
|
+
status = true
|
33
36
|
|
34
37
|
penultimate_idx = result.lines.count - 2
|
35
38
|
penultimate_line = result.lines[penultimate_idx]
|
@@ -37,17 +40,20 @@ module RRRSpec
|
|
37
40
|
if penultimate_line.match(/(\d+) failed/)
|
38
41
|
n = penultimate_line.match(/(\d+) failed/)[1].to_i
|
39
42
|
(1..n).each { formatter.example_failed nil }
|
43
|
+
status = false
|
40
44
|
end
|
41
45
|
|
42
46
|
if penultimate_line.match(/(\d+) skipped/)
|
43
47
|
n = penultimate_line.match(/(\d+) skipped/)[1].to_i
|
44
|
-
(1..n).each { formatter.example_pending }
|
48
|
+
(1..n).each { formatter.example_pending nil}
|
45
49
|
end
|
46
50
|
|
47
51
|
if penultimate_line.match(/(\d+) passed/)
|
48
52
|
n = penultimate_line.match(/(\d+) passed/)[1].to_i
|
49
|
-
(1..n).each { formatter.example_passed }
|
53
|
+
(1..n).each { formatter.example_passed nil}
|
50
54
|
end
|
55
|
+
|
56
|
+
status
|
51
57
|
end
|
52
58
|
|
53
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rrrspec-cucumber2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João Luís
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|