forking_test_runner 0.3.0 → 0.3.1

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: 6dca3c5a7178d17e22459640f93e53fe249c32cd
4
- data.tar.gz: 9e1eb04ccc4bc8975c0e1b54f34156791fe73482
3
+ metadata.gz: b60ad12f5e9ca46633a91e12106f4fd6e00bb161
4
+ data.tar.gz: 453d510148cd579c234ed2d136f59fe6dbab7770
5
5
  SHA512:
6
- metadata.gz: 68dee24ec2121f17c59c35cc5974fa4f4ef7febff66efd92f14e9ab373de5e515f37eb62b232d756ee77dc02c62d7682170568607c72e8fdb6ee4819dbd58293
7
- data.tar.gz: ce852d8d6f354e0e67b2dd86fcef4edc46ebfea3aeb32fa9a234a1999948ff078cf12896c4b8599c97f9940d03bc627f1fb9eaa558226a2a7c142e97bca1c1ac
6
+ metadata.gz: d4c72f64b34403c193e2fca528ef30e9f7de3afd4a2176148649ba033fe6e76ba49c87a4800f7b99af1459409b925147c086e1d7c6e576d83b16b95ef35a1f23
7
+ data.tar.gz: b7fe40d180eabde2317abbf720e0f944e5b4fa94792c11c76225c6d89c328d2768a24c6db0b35c7f761d69bb8ff30dbaa4d2b422106de7318ac92a7e36e98b38
@@ -1,3 +1,3 @@
1
1
  module ForkingTestRunner
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -137,16 +137,25 @@ module ForkingTestRunner
137
137
  def run_test(file)
138
138
  preload_fixtures
139
139
  ActiveRecord::Base.connection.disconnect!
140
- child = fork do
141
- key = (ActiveRecord::VERSION::STRING >= "4.1.0" ? :test : "test")
142
- ActiveRecord::Base.establish_connection key
143
- enable_minitest_autorun
144
- require "./#{file}"
140
+ change_program_name_to file do
141
+ child = fork do
142
+ key = (ActiveRecord::VERSION::STRING >= "4.1.0" ? :test : "test")
143
+ ActiveRecord::Base.establish_connection key
144
+ enable_minitest_autorun
145
+ require "./#{file}"
146
+ end
147
+ Process.wait(child)
145
148
  end
146
- Process.wait(child)
147
149
  $?.success?
148
150
  end
149
151
 
152
+ def change_program_name_to(name)
153
+ old, $0 = $0, name
154
+ yield
155
+ ensure
156
+ $0 = old
157
+ end
158
+
150
159
  def find_tests_for_group(group, group_count, tests, runtime_log)
151
160
  require 'parallel_tests/test/runner'
152
161
 
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-12 00:00:00.000000000 Z
11
+ date: 2015-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel_tests