parallel_tests 0.16.16 → 0.16.17
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/Gemfile.lock +1 -1
- data/Readme.md +1 -0
- data/lib/parallel_tests/cli.rb +2 -1
- data/lib/parallel_tests/gherkin/runner.rb +3 -1
- data/lib/parallel_tests/version.rb +1 -1
- data/spec/parallel_tests/cli_spec.rb +15 -0
- data/spec/parallel_tests/gherkin/runner_behaviour.rb +7 -0
- 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: dc14ccc17914b5a7128310bd40d87739a52662e9
|
4
|
+
data.tar.gz: a4b64d0afd0ed488b981d3b2e84366a84bae6d37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 599cccbd365d2d5443553bcae320d9ba632805079aa3d029063e844c408245cf5239ffa10a5ded8deecd0db4c65793b75bfbaf0287fdbe033174b822d5478d2b
|
7
|
+
data.tar.gz: 99dd70c7b4473fa0a56a53bd94d99b3d20e3049fb6de7cae9e29954c26438652be1be88f56a2e4897f98dc243d184b60b7548191fe89b198273f88d726c62624
|
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -296,6 +296,7 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
|
|
296
296
|
- [Wataru MIYAGUNI](https://github.com/gongo)
|
297
297
|
- [Brandon Turner](https://github.com/blt04)
|
298
298
|
- [Matt Hodgson](https://github.com/mhodgson)
|
299
|
+
- [bicarbon8](https://github.com/bicarbon8)
|
299
300
|
|
300
301
|
[Michael Grosser](http://grosser.it)<br/>
|
301
302
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -162,7 +162,8 @@ TEXT
|
|
162
162
|
|
163
163
|
def load_runner(type)
|
164
164
|
require "parallel_tests/#{type}/runner"
|
165
|
-
|
165
|
+
runner_classname = type.split("_").map(&:capitalize).join.sub("Rspec", "RSpec")
|
166
|
+
klass_name = "ParallelTests::#{runner_classname}::Runner"
|
166
167
|
klass_name.split('::').inject(Object) { |x, y| x.const_get(y) }
|
167
168
|
end
|
168
169
|
|
@@ -9,7 +9,9 @@ module ParallelTests
|
|
9
9
|
def run_tests(test_files, process_number, num_processes, options)
|
10
10
|
sanitized_test_files = test_files.map { |val| WINDOWS ? "\"#{val}\"" : Shellwords.escape(val) }
|
11
11
|
|
12
|
-
options
|
12
|
+
options[:env] ||= {}
|
13
|
+
options[:env] = options[:env].merge({"AUTOTEST" => "1"}) if $stdout.tty? # display color when we are in a terminal
|
14
|
+
|
13
15
|
cmd = [
|
14
16
|
executable,
|
15
17
|
(runtime_logging if File.directory?(File.dirname(runtime_log))),
|
@@ -46,6 +46,11 @@ describe ParallelTests::CLI do
|
|
46
46
|
subject.send(:load_runner, "rspec").should == ParallelTests::RSpec::Runner
|
47
47
|
end
|
48
48
|
|
49
|
+
it "requires and loads runner with underscores" do
|
50
|
+
subject.should_receive(:require).with("parallel_tests/my_test_runner/runner")
|
51
|
+
subject.send(:load_runner, "my_test_runner").should == ParallelTests::MyTestRunner::Runner
|
52
|
+
end
|
53
|
+
|
49
54
|
it "fails to load unfindable runner" do
|
50
55
|
expect{
|
51
56
|
subject.send(:load_runner, "foo").should == ParallelTests::RSpec::Runner
|
@@ -69,3 +74,13 @@ describe ParallelTests::CLI do
|
|
69
74
|
end
|
70
75
|
end
|
71
76
|
end
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
module ParallelTests
|
81
|
+
module MyTestRunner
|
82
|
+
class Runner
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
@@ -24,6 +24,13 @@ shared_examples_for 'gherkin runners' do
|
|
24
24
|
ENV.delete('PARALLEL_TESTS_EXECUTABLE')
|
25
25
|
end
|
26
26
|
|
27
|
+
it "permits setting env options" do
|
28
|
+
ParallelTests::Test::Runner.should_receive(:execute_command).with { |a, b, c, options|
|
29
|
+
options[:env]["TEST"] == "ME"
|
30
|
+
}
|
31
|
+
call(['xxx'], 1, 22, {:env => {'TEST' => 'ME'}})
|
32
|
+
end
|
33
|
+
|
27
34
|
it "runs bundle exec {runner_name} when on bundler 0.9" do
|
28
35
|
ParallelTests.stub!(:bundler_enabled?).and_return true
|
29
36
|
should_run_with %r{bundle exec #{runner_name}}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|