parallel_split_test 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +32 -0
- data/lib/parallel_split_test/command_line.rb +1 -1
- data/lib/parallel_split_test/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65917250cd2361e8c7739b8696258d00454935a0a5762aabc7a1101b0748b6a4
|
4
|
+
data.tar.gz: ceba1c8756edf06e496dd51791dc50c1390b0eeafd4c9bc08c45036721525f75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b123a5db0ed451dd9964901098f3db0cd5103a84e6e0aac3b72da6127b54e53ebee9e66705bc7dfaa91958142d9d3126c907646fbd7fbbca8409be1e188a340
|
7
|
+
data.tar.gz: aec4a96ac4e5a99acc62aaccfb8358e5421adedf8e72647d25e2d63c896581a952dfe6f81eb38a896bcfb08a334ce9df0ab2fab4a3a2631e866968b8739a4e8e
|
data/Readme.md
CHANGED
@@ -68,6 +68,38 @@ TIPS
|
|
68
68
|
- set number of processes to use with `PARALLEL_SPLIT_TEST_PROCESSES` environment variable
|
69
69
|
- [unify JUnit output](http://dresscode.renttherunway.com/blog/631) for rspec
|
70
70
|
|
71
|
+
|
72
|
+
before(:all) rspec hooks
|
73
|
+
========================
|
74
|
+
|
75
|
+
The `before(:all)` hooks in rspec will be executed once for every process that runs a test in an example group. This means if you have more processes than tests in a group, the `before(:all)` block for that group will be fired N times. For example, this spec has 3 tests and a `before(:all)` block:
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
describe "before all behavior"
|
79
|
+
before(:all) do
|
80
|
+
puts "Process: #{Process.pid} Before ALL"
|
81
|
+
end
|
82
|
+
|
83
|
+
it "a" do
|
84
|
+
end
|
85
|
+
|
86
|
+
it "b" do
|
87
|
+
end
|
88
|
+
|
89
|
+
it "c" do
|
90
|
+
end
|
91
|
+
end
|
92
|
+
```
|
93
|
+
|
94
|
+
When you run this with 3 or more processes you'll see the `before(:all)` call is invoked 3 times, once per each process (since "a", "b", and "c" tests are each run on a different process).
|
95
|
+
|
96
|
+
```
|
97
|
+
$ PARALLEL_SPLIT_TEST_PROCESSES=3 bundle exec parallel_split_test spec/ | grep "Before ALL"
|
98
|
+
Process: 31539 Before ALL
|
99
|
+
Process: 31538 Before ALL
|
100
|
+
Process: 31540 Before ALL
|
101
|
+
```
|
102
|
+
|
71
103
|
TODO
|
72
104
|
====
|
73
105
|
- Cucumber support
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_split_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: rspec
|
14
|
+
name: rspec-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|