parallel_tests 0.13.2 → 0.13.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.13.2)
4
+ parallel_tests (0.13.3)
5
5
  parallel
6
6
 
7
7
  GEM
@@ -22,7 +22,7 @@ GEM
22
22
  json (>= 1.4.6)
23
23
  json (1.7.5)
24
24
  json (1.7.5-java)
25
- parallel (0.6.4)
25
+ parallel (0.6.5)
26
26
  rake (10.0.3)
27
27
  rspec (2.13.0)
28
28
  rspec-core (~> 2.13.0)
data/Readme.md CHANGED
@@ -285,6 +285,7 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
285
285
  - [Jawwad Ahmad](https://github.com/jawwad)
286
286
  - [Iain Beeston](https://github.com/iainbeeston)
287
287
  - [Alejandro Pulver](https://github.com/alepulver)
288
+ - [Felix Clack](https://github.com/felixclack)
288
289
 
289
290
  [Michael Grosser](http://grosser.it)<br/>
290
291
  michael@grosser.it<br/>
@@ -20,9 +20,12 @@ module ParallelTests
20
20
  end
21
21
 
22
22
  def self.determine_executable
23
- if ParallelTests.bundler_enabled?
23
+ case
24
+ when File.exists?("bin/cucumber")
25
+ "bin/cucumber"
26
+ when ParallelTests.bundler_enabled?
24
27
  "bundle exec cucumber"
25
- elsif File.file?("script/cucumber")
28
+ when File.file?("script/cucumber")
26
29
  "script/cucumber"
27
30
  else
28
31
  "cucumber"
@@ -14,14 +14,18 @@ module ParallelTests
14
14
  end
15
15
 
16
16
  def self.determine_executable
17
- cmd = if File.file?("script/spec")
17
+ cmd = case
18
+ when File.exists?("bin/rspec")
19
+ "bin/rspec"
20
+ when File.file?("script/spec")
18
21
  "script/spec"
19
- elsif ParallelTests.bundler_enabled?
22
+ when ParallelTests.bundler_enabled?
20
23
  cmd = (run("bundle show rspec-core") =~ %r{Could not find gem.*} ? "spec" : "rspec")
21
24
  "bundle exec #{cmd}"
22
25
  else
23
26
  %w[spec rspec].detect{|cmd| system "#{cmd} --version > /dev/null 2>&1" }
24
27
  end
28
+
25
29
  cmd or raise("Can't find executables rspec or spec")
26
30
  end
27
31
 
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.13.2'
2
+ VERSION = Version = '0.13.3'
3
3
  end
@@ -43,11 +43,17 @@ describe ParallelTests::Cucumber do
43
43
  call(['xxx'],1,22,{})
44
44
  end
45
45
 
46
+ it "uses bin/cucumber when present" do
47
+ File.stub(:exists?).with("bin/cucumber").and_return true
48
+ should_run_with %r{bin/cucumber}
49
+ call(['xxx'],1,22,{})
50
+ end
51
+
46
52
  it "uses options passed in" do
47
53
  should_run_with %r{script/cucumber .* -p default}
48
54
  call(['xxx'],1,22,:test_options => '-p default')
49
55
  end
50
-
56
+
51
57
  it "sanitizes dangerous file names" do
52
58
  should_run_with %r{xx\\ x}
53
59
  call(['xx x'],1,22,{})
@@ -84,6 +84,12 @@ describe ParallelTests::RSpec::Runner do
84
84
  call('xxx', 1, 22, {})
85
85
  end
86
86
 
87
+ it "uses bin/rspec when present" do
88
+ File.stub(:exists?).with('bin/rspec').and_return true
89
+ should_run_with %r{bin/rspec}
90
+ call('xxx', 1, 22, {})
91
+ end
92
+
87
93
  it "uses no -O when no opts where found" do
88
94
  File.stub!(:file?).with('spec/spec.opts').and_return false
89
95
  should_not_run_with %r{spec/spec.opts}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-21 00:00:00.000000000 Z
12
+ date: 2013-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  segments:
98
98
  - 0
99
- hash: -3050203089200603542
99
+ hash: -472457798658448123
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  none: false
102
102
  requirements:
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  segments:
107
107
  - 0
108
- hash: -3050203089200603542
108
+ hash: -472457798658448123
109
109
  requirements: []
110
110
  rubyforge_project:
111
111
  rubygems_version: 1.8.25