parallel_tests 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallel_tests (0.12.0)
4
+ parallel_tests (0.12.1)
5
5
  parallel
6
6
 
7
7
  GEM
@@ -47,4 +47,13 @@ module ParallelTests
47
47
  raise "Could not grep for processes -> #{result}" if result.strip != "" && !$?.success?
48
48
  result.split("\n").size
49
49
  end
50
+
51
+ # real time even if someone messed with timecop in tests
52
+ def self.now
53
+ if Time.respond_to?(:now_without_mock_time) # Timecop
54
+ Time.now_without_mock_time
55
+ else
56
+ Time.now
57
+ end
58
+ end
50
59
  end
@@ -1,5 +1,6 @@
1
1
  require 'optparse'
2
2
  require 'tempfile'
3
+ require 'parallel_tests'
3
4
 
4
5
  module ParallelTests
5
6
  class CLI
@@ -1,3 +1,5 @@
1
+ require 'parallel_tests'
2
+
1
3
  module ParallelTests
2
4
  module Cucumber
3
5
  module Io
@@ -11,11 +11,11 @@ module ParallelTests
11
11
  end
12
12
 
13
13
  def before_feature(_)
14
- @start_at = Time.now.to_f
14
+ @start_at = ParallelTests.now.to_f
15
15
  end
16
16
 
17
17
  def after_feature(feature)
18
- @example_times[feature.file] += Time.now.to_f - @start_at
18
+ @example_times[feature.file] += ParallelTests.now.to_f - @start_at
19
19
  end
20
20
 
21
21
  def after_features(*args)
@@ -1,3 +1,4 @@
1
+ require 'parallel_tests'
1
2
  require 'parallel_tests/rspec/logger_base'
2
3
 
3
4
  class ParallelTests::RSpec::RuntimeLogger < ParallelTests::RSpec::LoggerBase
@@ -7,12 +8,12 @@ class ParallelTests::RSpec::RuntimeLogger < ParallelTests::RSpec::LoggerBase
7
8
  end
8
9
 
9
10
  def example_started(*args)
10
- @time = Time.now
11
+ @time = ParallelTests.now
11
12
  end
12
13
 
13
14
  def example_passed(example)
14
15
  file = example.location.split(':').first
15
- @example_times[file] += Time.now - @time
16
+ @example_times[file] += ParallelTests.now - @time
16
17
  end
17
18
 
18
19
  def dump_summary(*args);end
@@ -1,3 +1,4 @@
1
+ require 'parallel_tests'
1
2
  require 'parallel_tests/test/runner'
2
3
 
3
4
  module ParallelTests
@@ -82,9 +83,9 @@ class ::Test::Unit::TestSuite
82
83
  alias :run_without_timing :run unless defined? @@timing_installed
83
84
 
84
85
  def run(result, &progress_block)
85
- start_time=Time.now
86
+ start_time = ParallelTests.now
86
87
  run_without_timing(result, &progress_block)
87
- end_time=Time.now
88
+ end_time = ParallelTests.now
88
89
  ParallelTests::Test::RuntimeLogger.log(self.tests.first, start_time, end_time)
89
90
  end
90
91
 
@@ -1,3 +1,3 @@
1
1
  module ParallelTests
2
- VERSION = Version = '0.12.0'
2
+ VERSION = Version = '0.12.1'
3
3
  end
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.12.0
4
+ version: 0.12.1
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: 2013-05-05 00:00:00.000000000 Z
12
+ date: 2013-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parallel
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  segments:
98
98
  - 0
99
- hash: 3143223892246402054
99
+ hash: -2065934911726419013
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  none: false
102
102
  requirements:
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  segments:
107
107
  - 0
108
- hash: 3143223892246402054
108
+ hash: -2065934911726419013
109
109
  requirements: []
110
110
  rubyforge_project:
111
111
  rubygems_version: 1.8.25