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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc667d156b62b8d5eceae868eaf399c293a79fd9
4
- data.tar.gz: 52070d8e8472751adb06531c993b9ca106fe8207
3
+ metadata.gz: 53e09ddabf887642808fed3d5a33e25845827501
4
+ data.tar.gz: ee00ac77e62ec5847c265cd93cf38f2bcd41cd29
5
5
  SHA512:
6
- metadata.gz: 786294b0dbbde29277cfd6f285a54792ff58c15809b81bfa58fabfb0da13009289719b822479b8be35a427b5afc6fd979ab96a1f5f3053d14815d5b319e0dad8
7
- data.tar.gz: b6d8d5a29fbbd521e8b47c90630a1f23a037dec302032db820f947b26d8226ba00dcc3f5280c45b66a858de71232de2bf122d076cb6d925a7ad550b461f7686e
6
+ metadata.gz: 087078526dd36889a765fe731cb5729c3769e37c4c7f8dd0ae4cb8ace375303368f799018995cd535c28fb417f992ad96634b8caeb7c11956cc64573af22603a
7
+ data.tar.gz: 8761d06030bd7f63463112e6b9a86b71a3169e2e930e3d2e30dd084786f669aad53a6a4eea182fe7e63952747010a81ef57ac9f024afca6dca91788301be61d6
@@ -1,3 +1,3 @@
1
1
  module SingleCov
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
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
- raise "Load minitest after setting up SingleCov"
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.0
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-17 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it