parallel_tests 0.8.13 → 0.8.14

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.
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  *.sh
2
+ tmp
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.8.13)
4
+ parallel_tests (0.8.14)
5
5
  parallel
6
6
 
7
7
  GEM
data/Readme.md CHANGED
@@ -12,21 +12,26 @@ If you use RSpec: ensure you got >= 2.4
12
12
 
13
13
  As gem
14
14
 
15
- # add to Gemfile
16
- gem "parallel_tests", :group => :development
17
-
15
+ ```ruby
16
+ # add to Gemfile
17
+ gem "parallel_tests", :group => :development
18
+ ```
18
19
  OR as plugin
19
20
 
20
21
  rails plugin install git://github.com/grosser/parallel_tests.git
21
22
 
22
- # add to Gemfile
23
- gem "parallel", :group => :development
23
+ ```ruby
24
+ # add to Gemfile
25
+ gem "parallel", :group => :development
26
+ ```
24
27
 
25
28
  ### Add to `config/database.yml`
26
29
  ParallelTests uses 1 database per test-process, 2 processes will use `*_test` and `*_test2`.
27
30
 
28
- test:
29
- database: yourproject_test<%= ENV['TEST_ENV_NUMBER'] %>
31
+ ```yaml
32
+ test:
33
+ database: yourproject_test<%= ENV['TEST_ENV_NUMBER'] %>
34
+ ```
30
35
 
31
36
  ### Create additional database(s)
32
37
  rake parallel:create
@@ -75,9 +80,9 @@ Rspec: Add to your `.rspec_parallel` (or `.rspec`) :
75
80
  --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
76
81
 
77
82
  Test::Unit: Add to your `test_helper.rb`:
78
-
79
- require 'parallel_tests/test/runtime_logger'
80
-
83
+ ```ruby
84
+ require 'parallel_tests/test/runtime_logger'
85
+ ```
81
86
 
82
87
  RSpec: SummaryLogger
83
88
  --------------------
@@ -164,7 +169,6 @@ TIPS
164
169
  - [Sphinx setup](https://github.com/grosser/parallel_tests/wiki)
165
170
  - [Capistrano setup](https://github.com/grosser/parallel_tests/wiki/Remotely-with-capistrano) let your tests run on a big box instead of your laptop
166
171
  - [SQL schema format] use :ruby schema format to get faster parallel:prepare`
167
- - [ActiveRecord] if you do not have `db:abort_if_pending_migrations` add this to your Rakefile: `task('db:abort_if_pending_migrations'){}`
168
172
  - `export PARALLEL_TEST_PROCESSORS=X` in your environment and parallel_tests will use this number of processors by default
169
173
  - [ZSH] use quotes to use rake arguments `rake "parallel:prepare[3]"`
170
174
  - [email_spec and/or action_mailer_cache_delivery](https://github.com/grosser/parallel_tests/wiki)
@@ -216,7 +220,8 @@ inspired by [pivotal labs](http://pivotallabs.com/users/miked/blog/articles/849-
216
220
  - [Georg Friedrich](https://github.com/georg)
217
221
  - [R. Tyler Croy](https://github.com/rtyler)
218
222
  - [Ulrich Berkmüller](https://github.com/ulrich-berkmueller)
219
- - [https://github.com/madmax](https://github.com/madmax)
223
+ - [Grzegorz Derebecki](https://github.com/madmax)
224
+ - [Florian Motlik](https://github.com/flomotlik)
220
225
 
221
226
  [Michael Grosser](http://grosser.it)<br/>
222
227
  michael@grosser.it<br/>
@@ -103,7 +103,7 @@ namespace :parallel do
103
103
 
104
104
  desc "load the seed data from db/seeds.rb via db:seed --> parallel:seed[num_cpus]"
105
105
  task :seed, :count do |t,args|
106
- run_in_parallel("rake db:seed RAILS_ENV=#{ParallelTests::Tasks.rails_env}", args)
106
+ ParallelTests::Tasks.run_in_parallel("rake db:seed RAILS_ENV=#{ParallelTests::Tasks.rails_env}", args)
107
107
  end
108
108
 
109
109
  ['test', 'spec', 'features'].each do |type|
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.8.13'
2
+ VERSION = Version = '0.8.14'
3
3
  end
@@ -81,25 +81,42 @@ describe ParallelTests::Tasks do
81
81
  [result, $?.success?]
82
82
  end
83
83
 
84
- it "should hide offending lines" do
85
- call("echo 123", "123").should == ["", true]
86
- end
84
+ context "with pipefail supported" do
85
+ before :all do
86
+ if not system("set -o pipefail && test 1")
87
+ pending "pipefail is not supported on your system"
88
+ end
89
+ end
87
90
 
88
- it "should not hide other lines" do
89
- call("echo 124", "123").should == ["124\n", true]
90
- end
91
+ it "should hide offending lines" do
92
+ call("echo 123", "123").should == ["", true]
93
+ end
91
94
 
92
- it "should fail if command fails and the pattern matches" do
93
- call("echo 123 && test", "123").should == ["", false]
94
- end
95
+ it "should not hide other lines" do
96
+ call("echo 124", "123").should == ["124\n", true]
97
+ end
98
+
99
+ it "should fail if command fails and the pattern matches" do
100
+ call("echo 123 && test", "123").should == ["", false]
101
+ end
95
102
 
96
- it "should fail if command fails and the pattern fails" do
97
- call("echo 124 && test", "123").should == ["124\n", false]
103
+ it "should fail if command fails and the pattern fails" do
104
+ call("echo 124 && test", "123").should == ["124\n", false]
105
+ end
98
106
  end
99
107
 
100
- it "should not filter if pipefail is not possible" do
101
- ParallelTests::Tasks.should_receive(:system).with("set -o pipefail && test 1").and_return false
102
- call("echo 123", "123").should == ["123\n", true]
108
+ context "without pipefail supported" do
109
+ before do
110
+ ParallelTests::Tasks.should_receive(:system).with("set -o pipefail && test 1").and_return false
111
+ end
112
+
113
+ it "should not filter and succeed" do
114
+ call("echo 123", "123").should == ["123\n", true]
115
+ end
116
+
117
+ it "should not filter and fail" do
118
+ call("echo 123 && test", "123").should == ["123\n", false]
119
+ end
103
120
  end
104
121
  end
105
122
 
@@ -2,6 +2,13 @@ require 'spec_helper'
2
2
 
3
3
  describe ParallelTests::Test::RuntimeLogger do
4
4
  describe :writing do
5
+ around do |example|
6
+ use_temporary_directory_for do
7
+ FileUtils.mkdir_p(File.dirname(log))
8
+ example.call
9
+ end
10
+ end
11
+
5
12
  let(:log) { ParallelTests::Test::Runner.runtime_log }
6
13
 
7
14
  it "overwrites the runtime_log file on first log invocation" do
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.13
4
+ version: 0.8.14
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-09-26 00:00:00.000000000 Z
12
+ date: 2012-10-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: -388650261339101456
94
+ hash: 1255476358488583165
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: -388650261339101456
103
+ hash: 1255476358488583165
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 1.8.24