minitest-reporters 0.14.16 → 0.14.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/minitest/reporters/version.rb +1 -1
- data/lib/minitest/reporters.rb +23 -18
- data/test/test_helper.rb +1 -0
- 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: e7426f0af16246f1769d320124a20ed66808f693
|
4
|
+
data.tar.gz: 27ff0824cfc3ea248f8a64a724b880783f77fd03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37f9563cfb405ff5fc0ba08908e6f846e426e255d04750e80777be907751fd2bc7d953b5d481ffd1edb7230d1a0f4c3180d2a71906768544db265eeed40098f3
|
7
|
+
data.tar.gz: d5a9595187cb95399479d50d439b73326f6e1951849182da13505f205276247a7af115b250fcde04c10729c6373ebda06e20599002272707c83cbde67ed269e3
|
data/lib/minitest/reporters.rb
CHANGED
@@ -22,10 +22,15 @@ module MiniTest
|
|
22
22
|
|
23
23
|
def self.use!(console_reporters = ProgressReporter.new, env = ENV, backtrace_filter = ExtensibleBacktraceFilter.default_filter)
|
24
24
|
use_runner!(console_reporters, env)
|
25
|
-
use_around_test_hooks!
|
26
25
|
use_backtrace_filter!(backtrace_filter)
|
27
|
-
|
28
|
-
|
26
|
+
|
27
|
+
unless defined?(@@loaded)
|
28
|
+
use_around_test_hooks!
|
29
|
+
use_parallel_length_method!
|
30
|
+
use_old_activesupport_fix!
|
31
|
+
end
|
32
|
+
|
33
|
+
@@loaded = true
|
29
34
|
end
|
30
35
|
|
31
36
|
def self.use_runner!(console_reporters, env)
|
@@ -34,22 +39,8 @@ module MiniTest
|
|
34
39
|
Unit.runner = runner
|
35
40
|
end
|
36
41
|
|
37
|
-
def self.use_around_test_hooks!
|
38
|
-
Unit::TestCase.class_eval do
|
39
|
-
def run_with_hooks(runner)
|
40
|
-
AroundTestHooks.before_test(self)
|
41
|
-
result = run_without_hooks(runner)
|
42
|
-
AroundTestHooks.after_test(self)
|
43
|
-
result
|
44
|
-
end
|
45
|
-
|
46
|
-
alias_method :run_without_hooks, :run
|
47
|
-
alias_method :run, :run_with_hooks
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
42
|
def self.use_backtrace_filter!(backtrace_filter)
|
52
|
-
if Unit::VERSION < "4.1.0"
|
43
|
+
if Unit::VERSION < "4.1.0" && !defined?(@@loaded)
|
53
44
|
MiniTest.class_eval do
|
54
45
|
class << self
|
55
46
|
attr_accessor :backtrace_filter
|
@@ -64,6 +55,20 @@ module MiniTest
|
|
64
55
|
MiniTest.backtrace_filter = backtrace_filter
|
65
56
|
end
|
66
57
|
|
58
|
+
def self.use_around_test_hooks!
|
59
|
+
Unit::TestCase.class_eval do
|
60
|
+
def run_with_hooks(runner)
|
61
|
+
AroundTestHooks.before_test(self)
|
62
|
+
result = run_without_hooks(runner)
|
63
|
+
AroundTestHooks.after_test(self)
|
64
|
+
result
|
65
|
+
end
|
66
|
+
|
67
|
+
alias_method :run_without_hooks, :run
|
68
|
+
alias_method :run, :run_with_hooks
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
67
72
|
def self.choose_reporters(console_reporters, env)
|
68
73
|
if env["TM_PID"]
|
69
74
|
[RubyMateReporter.new]
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-reporters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|