forking_test_runner 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a67e7eece9a15b00bffcc3846b478358897ffa31
4
- data.tar.gz: a96df2d8489856d760441734318fe288c6bf6d6b
3
+ metadata.gz: 2ac83a5a2c478db627543f6aa682c2b8ecc32fdd
4
+ data.tar.gz: 3c0a8b85d8ee654287f57582027625fbe2ca8a07
5
5
  SHA512:
6
- metadata.gz: de9e03f237210c2c9de5a7629f198c48bf1a8ef770a08ee86b0d6b5254415b2ca390c173c0d7f08aaee673e2f8da7dbd0cf1bb51fe304a032234ab15ec179031
7
- data.tar.gz: ee9a2c077c098216da0fdd8c787257f4ed7da499172163248f22d7385b99f743859ee9e6038071a81e5214b7abeaf50089d8936db0a14720e3704e41881607fb
6
+ metadata.gz: ee1ca158532118e09bbcfd11e522a69e84cdcfc954f92d8bab55956b24c8e3eb523cf2b042d26b2ea28c3ebc851e73d8e45691fac4b7727243ff868a65964a97
7
+ data.tar.gz: 01302ee774cd197531acd520bf228401b6ccc4b0dbfa6a1c5a8dbf8ab98c7f169b6ce0983cb79f1c10ba3fb63a90352d97760f394a2b3e299aeb254cd8e2daa4
@@ -1,3 +1,3 @@
1
1
  module ForkingTestRunner
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -66,6 +66,11 @@ module ForkingTestRunner
66
66
  puts "Running tests #{tests.map(&:first).join(" ")}"
67
67
  end
68
68
 
69
+ if ar?
70
+ preload_fixtures
71
+ ActiveRecord::Base.connection.disconnect!
72
+ end
73
+
69
74
  Coverage.capture_coverage! if @merge_coverage
70
75
 
71
76
  # run all the tests
@@ -198,8 +203,7 @@ module ForkingTestRunner
198
203
  # This forces Rails to load all fixtures, then prevents it from
199
204
  # "deleting and re-inserting all fixtures" when a new connection is used (forked).
200
205
  def preload_fixtures
201
- return if @preloaded || @no_fixtures
202
- @preloaded = true
206
+ return if @no_fixtures
203
207
 
204
208
  fixtures = (ActiveSupport::VERSION::MAJOR == 3 ? ActiveRecord::Fixtures : ActiveRecord::FixtureSet)
205
209
 
@@ -251,11 +255,6 @@ module ForkingTestRunner
251
255
  end
252
256
 
253
257
  def run_test(file)
254
- if ar?
255
- preload_fixtures
256
- ActiveRecord::Base.connection.disconnect!
257
- end
258
-
259
258
  output = change_program_name_to file do
260
259
  fork_with_captured_output(!@quiet) do
261
260
  SimpleCov.pid = Process.pid if defined?(SimpleCov) && SimpleCov.respond_to?(:pid=) # trick simplecov into reporting in this fork
@@ -339,7 +338,7 @@ module ForkingTestRunner
339
338
 
340
339
  if value
341
340
  minitest_class.autorun
342
- require "./#{file}"
341
+ require(file.start_with?('/') ? file : "./#{file}")
343
342
  end
344
343
  end
345
344
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forking_test_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.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: 2016-08-26 00:00:00.000000000 Z
11
+ date: 2017-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel_tests
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="
147
147
  - !ruby/object:Gem::Version
148
- version: 2.2.0
148
+ version: 2.0.0
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - ">="