single_cov 0.5.2 → 0.5.3

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: 1ebf2f818f1b5ac6cbca8abbc8a8b0a54c06be81
4
- data.tar.gz: f5a77b1adaef9c03177ea177bf6239021722188f
3
+ metadata.gz: a8553cc1e60d1c46cf0192c1a8b8c7cfd034bc5b
4
+ data.tar.gz: c49c028c443b2c12d15a1e718956f3ceac9f7cf7
5
5
  SHA512:
6
- metadata.gz: f95df1082b4afa1b9bc854c3f903685a705a9e7a38edd05ba760fc5d484e573689243555d7e29ad2b146625c756609cd7628703c4bfa0556c4cd9e1109df8c5a
7
- data.tar.gz: 3684c08111d533b362c3d08c83e5854b5e3335c2792cf3d2c8b39e8d5bf0a234d062c9e2c97742f3a91e5782e2186c46aeba7b7c3ac9f7c6cb4a9b1ee32730f1
6
+ metadata.gz: 537ad7a74adf2be0ee7a7c869164cee1dfa5950fc6d2fd9949e755efbbf1388e0306bd87eb223f58c7a5aeb5ccdf541bca628c388b2bdc90998d4c74bb140d6c
7
+ data.tar.gz: b8d8c5b813efa779c00032942e466df27b5185370b9bcd772281b5d48aa5a3c503f8a54f626cfabf3ddfd0028069d004f5faf2fdc1cbe7074f8d1a398a454242
data/lib/single_cov.rb CHANGED
@@ -115,11 +115,21 @@ module SingleCov
115
115
 
116
116
  # we cannot insert our hooks when minitest is already running
117
117
  def minitest_should_not_be_running!
118
- if defined?(Minitest) && Minitest.class_variable_defined?(:@@installed_at_exit) && Minitest.class_variable_get(:@@installed_at_exit)
119
- unless faked_by_forking_test_runner? # untested
120
- raise "Load minitest after setting up SingleCov"
121
- end
122
- end
118
+ return unless defined?(Minitest)
119
+ return unless Minitest.class_variable_defined?(:@@installed_at_exit)
120
+ return unless Minitest.class_variable_get(:@@installed_at_exit)
121
+
122
+ # untested
123
+ # https://github.com/rails/rails/pull/26515 rails loads autorun before test
124
+ # but it works out for some reason
125
+ return if Minitest.respond_to?(:run_with_rails_extension)
126
+
127
+ # untested
128
+ # forking test runner does some hacky acrobatics to fake minitest status
129
+ # and the resets it ... works out ok in the end ...
130
+ return if faked_by_forking_test_runner?
131
+
132
+ raise "Load minitest after setting up SingleCov"
123
133
  end
124
134
 
125
135
  # ForkingTestRunner fakes an initialized minitest to avoid multiple hooks being installed
@@ -1,3 +1,3 @@
1
1
  module SingleCov
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: single_cov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
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-09-17 00:00:00.000000000 Z
11
+ date: 2016-09-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it