parallel_tests 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.8.2)
4
+ parallel_tests (0.8.3)
5
5
  parallel
6
6
 
7
7
  GEM
data/Readme.md CHANGED
@@ -119,6 +119,7 @@ Setup for non-rails
119
119
  parallel_test test/bar test/baz/foo_text.rb
120
120
 
121
121
  Options are:
122
+
122
123
  -n [PROCESSES] How many processes to use, default: available CPUs
123
124
  -p, --pattern [PATTERN] run tests matching this pattern
124
125
  --group-by group tests by:
@@ -104,6 +104,11 @@ TEXT
104
104
 
105
105
  raise "--group-by found and --single-process are not supported" if options[:group_by] == :found and options[:single_process]
106
106
 
107
+ if options[:count] == 0
108
+ options.delete(:count)
109
+ options[:non_parallel] = true
110
+ end
111
+
107
112
  options[:files] = argv
108
113
  options
109
114
  end
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.8.2'
2
+ VERSION = Version = '0.8.3'
3
3
  end
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+ require 'parallel_tests/cli'
3
+
4
+ describe ParallelTest::CLI do
5
+ describe ".parse_options" do
6
+ let(:defaults){ {:files => []} }
7
+
8
+ def call(*args)
9
+ ParallelTest::CLI.send(:parse_options!, *args)
10
+ end
11
+
12
+ it "parses regular count" do
13
+ call(["-n3"]).should == defaults.merge(:count => 3)
14
+ end
15
+
16
+ it "parses count 0 as non-parallel" do
17
+ call(["-n0"]).should == defaults.merge(:non_parallel => true)
18
+ end
19
+
20
+ it "parses non-parallel as non-parallel" do
21
+ call(["--non-parallel"]).should == defaults.merge(:non_parallel => true)
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,4 @@
1
+ require 'spec_helper'
1
2
  require 'parallel_tests/grouper'
2
3
  require 'tmpdir'
3
4
 
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.8.2
4
+ version: 0.8.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: 2012-05-29 00:00:00.000000000 Z
12
+ date: 2012-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel
@@ -63,6 +63,7 @@ files:
63
63
  - lib/parallel_tests/version.rb
64
64
  - parallel_tests.gemspec
65
65
  - spec/integration_spec.rb
66
+ - spec/parallel_tests/cli_spec.rb
66
67
  - spec/parallel_tests/cucumber/gherkin_listener_spec.rb
67
68
  - spec/parallel_tests/cucumber/runner_spec.rb
68
69
  - spec/parallel_tests/grouper_spec.rb
@@ -89,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
90
  version: '0'
90
91
  segments:
91
92
  - 0
92
- hash: -3167291477339384586
93
+ hash: -1699400275362291118
93
94
  required_rubygems_version: !ruby/object:Gem::Requirement
94
95
  none: false
95
96
  requirements:
@@ -98,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
99
  version: '0'
99
100
  segments:
100
101
  - 0
101
- hash: -3167291477339384586
102
+ hash: -1699400275362291118
102
103
  requirements: []
103
104
  rubyforge_project:
104
105
  rubygems_version: 1.8.24