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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a4987d9f0ae4fb08bfde5c003076f0baf0aa99f
4
- data.tar.gz: a086554051f7db3d4b60cf1f7b62f7a72247d2ea
3
+ metadata.gz: e7426f0af16246f1769d320124a20ed66808f693
4
+ data.tar.gz: 27ff0824cfc3ea248f8a64a724b880783f77fd03
5
5
  SHA512:
6
- metadata.gz: ff3c7d2f8770c0341294b944372b3134276070e28eca7cba017ed1d170039be76f54c04b8ccb7f15948866abdac7dfa77705ae8266e215eb94f311fc927dd3d8
7
- data.tar.gz: dcca69a9879bb3e5e1516cfdde8b81878e352d8254575c62098fbd3d28ca2ea67c01696da57b0eeeddc9a9b476a9154e6a44c9c2cd8c7f349692d47e888a7f68
6
+ metadata.gz: 37f9563cfb405ff5fc0ba08908e6f846e426e255d04750e80777be907751fd2bc7d953b5d481ffd1edb7230d1a0f4c3180d2a71906768544db265eeed40098f3
7
+ data.tar.gz: d5a9595187cb95399479d50d439b73326f6e1951849182da13505f205276247a7af115b250fcde04c10729c6373ebda06e20599002272707c83cbde67ed269e3
@@ -1,5 +1,5 @@
1
1
  module MiniTest
2
2
  module Reporters
3
- VERSION = "0.14.16"
3
+ VERSION = "0.14.17"
4
4
  end
5
5
  end
@@ -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
- use_parallel_length_method!
28
- use_old_activesupport_fix!
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
@@ -16,4 +16,5 @@ if ENV["REPORTER"]
16
16
  MiniTest::Reporters.use!(reporter_klass.new)
17
17
  else
18
18
  MiniTest::Reporters.use!(MiniTest::Reporters::DefaultReporter.new)
19
+ MiniTest::Reporters.use!(MiniTest::Reporters::DefaultReporter.new)
19
20
  end
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.16
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-05 00:00:00.000000000 Z
11
+ date: 2013-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest