rrrspec-cucumber2 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cc1adfcfac5b469bcfb005ca296f707b0a68427
4
- data.tar.gz: 9e41aa3af93d0cf7566ffd904e1595ef5d0d8fa2
3
+ metadata.gz: 6e1b220916705e2b3f4a94e956b368e20e058c68
4
+ data.tar.gz: a1d68778cfe84f7ac9baed2fd9fc55790f675787
5
5
  SHA512:
6
- metadata.gz: 9649356a9a14d899f2791ca0335dd839ba556f082a4e46b3b1fcfd429e4338ba46f31325542c8eab5a0e39011cc2bae8eb8221afede624a7a812ef1c849b155c
7
- data.tar.gz: c1f23643db0e9094e29b7a2baeb58a8664fb60a70d4a52a6ae8e9ede3e2acd97a009d9f4823295332233c9db5753467c3cab15e7fbc0b0f7f6c37fb15087dcb8
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 = true
13
+ status = false
14
+ result_err = ''
14
15
 
15
16
  begin
16
- result = `SLAVE_NUMBER=#{ENV['SLAVE_NUMBER']} bundle exec cucumber #{@file_path}`
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
- status = process_result(formatter, result)
21
+ process_result(formatter, result_out)
21
22
  end
23
+
24
+ status = true
22
25
  rescue Exception => e
23
- status = false
24
- puts e.message
26
+ result_err = e.message
25
27
  end
26
28
 
27
- [status, result, '']
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
@@ -1,5 +1,5 @@
1
1
  module RRRSpec
2
2
  module Cucumber2
3
- VERSION = '1.0.4'
3
+ VERSION = '1.0.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrrspec-cucumber2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Luís