parallel_tests 0.16.1 → 0.16.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b322afa7119d8a9864f0a49b2f5a3a8ee88fb600
4
- data.tar.gz: 746437b785557120f0bf77f5cfe65e27ffe1a3cb
3
+ metadata.gz: 5a0ef227d19c8ce419f36311753bb866f9f38d5d
4
+ data.tar.gz: eaa72a97efd1868944a4208da8c7494a5752a7a7
5
5
  SHA512:
6
- metadata.gz: 5bb2825f6f7aa602d5bf9b86fa02fa748c95d50ce7edf7e75cc17ad0fe2e54b4fb9824183232fb136c29f063ed8066f944cf9aed2737dac96659a4a3394402de
7
- data.tar.gz: 6a1a18dca6241e8471e5ab537c27c15a38015f2dcd94993eaaeaa5d3114f292d24ed0d5c9343fbdeb83d0825d86f3dfea356de9813eeb26bc9909d8545e3261c
6
+ metadata.gz: 9268291358420de174a459a3877c37d6ea97d22c38738db425b9c9df87b58055f55ef642e5e62211a71b4192ee6fef1c56a7b7237874b8b9e0b5185f17a2fa94
7
+ data.tar.gz: bab1d2983b4957866ecec8d19add123f2cc97e1925fa46b3cf257fc1a6f48498538b16d16791678f72f42c997e4feb5bca33ba480b107c44da5b133a6ab8c3ba
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  *.sh
2
2
  tmp
3
+ .bundle
4
+ vendor
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.16.1)
4
+ parallel_tests (0.16.2)
5
5
  parallel
6
6
 
7
7
  GEM
@@ -24,7 +24,7 @@ GEM
24
24
  gherkin-ruby (0.3.0)
25
25
  json (1.7.5)
26
26
  json (1.7.5-java)
27
- parallel (0.8.4)
27
+ parallel (0.9.0)
28
28
  rake (10.0.3)
29
29
  rspec (2.13.0)
30
30
  rspec-core (~> 2.13.0)
data/Readme.md CHANGED
@@ -90,10 +90,12 @@ end
90
90
  Loggers
91
91
  ===================
92
92
 
93
- Even process runtimes
94
- -----------------
93
+ Even test group run-times
94
+ -------------------------
95
95
 
96
- Log test runtime to give each process the same runtime.
96
+ Add the `RuntimeLogger` to log how long each test takes to run.
97
+ This log file will be loaded on the next test run, and the tests will be grouped
98
+ so that each process should finish around the same time.
97
99
 
98
100
  Rspec: Add to your `.rspec_parallel` (or `.rspec`) :
99
101
 
@@ -48,17 +48,22 @@ module ParallelTests
48
48
  @collect[@uri] = 0
49
49
  end
50
50
 
51
- def examples(*args)
52
- @examples += 1
51
+ #
52
+ # @param [Gherkin::Formatter::Model::Examples] examples
53
+ #
54
+ def examples(examples)
55
+ if examples.rows.size > 0
56
+ @collect[@uri] += (@outline_steps * examples.rows.size)
57
+ end
53
58
  end
54
59
 
55
60
  def eof(*args)
56
- @collect[@uri] += (@background_steps * @scenarios) + (@outline_steps * @examples)
61
+ @collect[@uri] += (@background_steps * @scenarios)
57
62
  reset_counters!
58
63
  end
59
64
 
60
65
  def reset_counters!
61
- @examples = @outline = @outline_steps = @background = @background_steps = @scenarios = 0
66
+ @outline = @outline_steps = @background = @background_steps = @scenarios = 0
62
67
  @ignoring = nil
63
68
  end
64
69
 
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.16.1'
2
+ VERSION = Version = '0.16.2'
3
3
  end
@@ -31,16 +31,16 @@ describe ParallelTests::Gherkin::Listener do
31
31
  it "counts scenario outlines steps separately" do
32
32
  @listener.scenario_outline("outline")
33
33
  5.times {@listener.step(nil)}
34
- @listener.collect.should == {"feature_file" => 0}
34
+ @listener.examples(stub('examples', :rows => Array.new(3)))
35
+ @listener.collect.should == {"feature_file" => 15}
35
36
 
36
37
  @listener.scenario("scenario")
37
38
  2.times {@listener.step(nil)}
38
- @listener.collect.should == {"feature_file" => 2}
39
+ @listener.collect.should == {"feature_file" => 17}
39
40
 
40
41
  @listener.scenario("scenario")
41
- @listener.collect.should == {"feature_file" => 2}
42
+ @listener.collect.should == {"feature_file" => 17}
42
43
 
43
- 3.times {@listener.examples}
44
44
  @listener.eof
45
45
  @listener.collect.should == {"feature_file" => 17}
46
46
  end
@@ -71,15 +71,14 @@ describe ParallelTests::Gherkin::Listener do
71
71
  @listener.ignore_tag_pattern = nil
72
72
  @listener.scenario_outline( stub('scenario', :tags =>[ stub('tag', :name => '@WIP' )]) )
73
73
  @listener.step(nil)
74
- 3.times {@listener.examples}
74
+ @listener.examples(stub('examples', :rows => Array.new(3)))
75
75
  @listener.eof
76
76
  @listener.collect.should == {"feature_file" => 3}
77
77
 
78
-
79
78
  @listener.ignore_tag_pattern = /@something_other_than_WIP/
80
79
  @listener.scenario_outline( stub('scenario', :tags =>[ stub('tag', :name => '@WIP' )]) )
81
80
  @listener.step(nil)
82
- 3.times {@listener.examples}
81
+ @listener.examples(stub('examples', :rows => Array.new(3)))
83
82
  @listener.eof
84
83
  @listener.collect.should == {"feature_file" => 6}
85
84
  end
@@ -88,7 +87,7 @@ describe ParallelTests::Gherkin::Listener do
88
87
  @listener.ignore_tag_pattern = /@WIP/
89
88
  @listener.scenario_outline( stub('scenario', :tags =>[ stub('tag', :name => '@WIP' )]) )
90
89
  @listener.step(nil)
91
- 3.times {@listener.examples}
90
+ @listener.examples(stub('examples', :rows => Array.new(3)))
92
91
  @listener.eof
93
92
  @listener.collect.should == {"feature_file" => 0}
94
93
  end
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.1
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-11 00:00:00.000000000 Z
11
+ date: 2013-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel