minitest-reporters 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,7 @@ module MiniTest
22
22
  use_runner!(console_reporters, env)
23
23
  use_before_test_hook!
24
24
  use_backtrace_filter!(backtrace_filter)
25
+ use_parallel_length_method!
25
26
  end
26
27
 
27
28
  def self.use_runner!(console_reporters, env)
@@ -65,5 +66,13 @@ module MiniTest
65
66
  Array(console_reporters)
66
67
  end
67
68
  end
69
+
70
+ def self.use_parallel_length_method!
71
+ if Unit::VERSION >= "4.2.0"
72
+ ParallelEach.send(:define_method, :length) do
73
+ @queue.length
74
+ end
75
+ end
76
+ end
68
77
  end
69
78
  end
@@ -1,5 +1,5 @@
1
1
  module MiniTest
2
2
  module Reporters
3
- VERSION = "0.12.0"
3
+ VERSION = "0.12.1"
4
4
  end
5
5
  end
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency 'powerbar'
20
20
  s.add_dependency 'builder'
21
21
 
22
- s.add_development_dependency 'rr'
23
22
  s.add_development_dependency 'maruku'
24
23
  s.add_development_dependency 'rake'
25
24
 
@@ -1,11 +1,9 @@
1
1
  require "bundler/setup"
2
2
  require "minitest/autorun"
3
- require "rr"
4
3
  require "minitest/reporters"
5
4
 
6
5
  module MiniTestReportersTest
7
6
  class TestCase < MiniTest::Unit::TestCase
8
- include RR::Adapters::MiniTest
9
7
  end
10
8
  end
11
9
 
@@ -35,15 +35,5 @@ module MiniTestReportersTest
35
35
  @reporter.runner.verbose = false
36
36
  end
37
37
  end
38
-
39
- def test_print
40
- mock(@reporter.output).print('foo')
41
- @reporter.print('foo')
42
- end
43
-
44
- def test_puts
45
- mock(@reporter.output).puts('foo')
46
- @reporter.puts('foo')
47
- end
48
38
  end
49
39
  end
@@ -5,13 +5,16 @@ module MiniTestReportersTest
5
5
  def test_chooses_the_rubymine_reporter_when_necessary
6
6
  # Rubymine reporter complains when RubyMine libs are not available, so
7
7
  # stub its #puts method out.
8
- stub(MiniTest::Unit.runner.output).puts
8
+ original_output = MiniTest::Unit.runner.output
9
+ MiniTest::Unit.runner.send(:define_singleton_method, :output) { StringIO.new }
9
10
 
10
11
  reporters = Minitest::Reporters.choose_reporters [], { "RM_INFO" => "x" }
11
12
  assert_instance_of MiniTest::Reporters::RubyMineReporter, reporters[0]
12
13
 
13
14
  reporters = Minitest::Reporters.choose_reporters [], { "TEAMCITY_VERSION" => "x" }
14
15
  assert_instance_of MiniTest::Reporters::RubyMineReporter, reporters[0]
16
+ ensure
17
+ MiniTest::Unit.runner.send(:define_singleton_method, :output) { original_output }
15
18
  end
16
19
 
17
20
  def test_chooses_the_textmate_reporter_when_necessary
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-reporters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-15 00:00:00.000000000 Z
12
+ date: 2012-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -81,22 +81,6 @@ dependencies:
81
81
  - - ! '>='
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: rr
86
- requirement: !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
89
- - - ! '>='
90
- - !ruby/object:Gem::Version
91
- version: '0'
92
- type: :development
93
- prerelease: false
94
- version_requirements: !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
97
- - - ! '>='
98
- - !ruby/object:Gem::Version
99
- version: '0'
100
84
  - !ruby/object:Gem::Dependency
101
85
  name: maruku
102
86
  requirement: !ruby/object:Gem::Requirement