single_cov 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/single_cov/version.rb +1 -1
- data/lib/single_cov.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53e09ddabf887642808fed3d5a33e25845827501
|
4
|
+
data.tar.gz: ee00ac77e62ec5847c265cd93cf38f2bcd41cd29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 087078526dd36889a765fe731cb5729c3769e37c4c7f8dd0ae4cb8ace375303368f799018995cd535c28fb417f992ad96634b8caeb7c11956cc64573af22603a
|
7
|
+
data.tar.gz: 8761d06030bd7f63463112e6b9a86b71a3169e2e930e3d2e30dd084786f669aad53a6a4eea182fe7e63952747010a81ef57ac9f024afca6dca91788301be61d6
|
data/lib/single_cov/version.rb
CHANGED
data/lib/single_cov.rb
CHANGED
@@ -116,10 +116,18 @@ module SingleCov
|
|
116
116
|
# we cannot insert our hooks when minitest is already running
|
117
117
|
def minitest_should_not_be_running!
|
118
118
|
if defined?(Minitest) && Minitest.class_variable_defined?(:@@installed_at_exit) && Minitest.class_variable_get(:@@installed_at_exit)
|
119
|
-
|
119
|
+
unless faked_by_forking_test_runner? # untested
|
120
|
+
raise "Load minitest after setting up SingleCov"
|
121
|
+
end
|
120
122
|
end
|
121
123
|
end
|
122
124
|
|
125
|
+
# ForkingTestRunner fakes an initialized minitest to avoid multiple hooks being installed
|
126
|
+
# so hooks still get added in order https://github.com/grosser/forking_test_runner/pull/4
|
127
|
+
def faked_by_forking_test_runner?
|
128
|
+
defined?(Coverage) && Coverage.respond_to?(:capture_coverage!)
|
129
|
+
end
|
130
|
+
|
123
131
|
# do not record or verify when only running selected tests since it would be missing data
|
124
132
|
# either via option or via rails test runner which takes file:line
|
125
133
|
def minitest_running_subset_of_tests?
|
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.
|
4
|
+
version: 0.5.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: 2016-06-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: michael@grosser.it
|