minitest-reporter-api 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.index +1 -1
- data/lib/minitest/reporter_api.rb +12 -6
- 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: 3978618b01439a40d4b35086c4169b0422f6d174
|
4
|
+
data.tar.gz: 63d756ac2162409120a3d143bb2e0ea8ecfe84ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09ddac59876ddc9ec3c32dcebfb5a8d3c4253ddab2832b3c97e33f2ad5d0502af8953ff5204a776905bae108d69dbf0ac587d92f2300cb0f52fc85e1731ac9f2
|
7
|
+
data.tar.gz: 2f9439ed73b320b4143b98cd2e7ed70f737315419772974b09be78b9a5467268b1f407e18c9cb4233351e659c5a196313511a5fb5e95881d1dbbadb3fb6d26d3
|
data/.index
CHANGED
@@ -51,5 +51,5 @@ summary: Minitest API for setting reporter in code.
|
|
51
51
|
description: |-
|
52
52
|
Minitest Report API is a small patch to Minitest that allows reporters to be
|
53
53
|
set in code, i.e. test_helper.rb script, rather then just via the command line.
|
54
|
-
version: 0.0.
|
54
|
+
version: 0.0.5
|
55
55
|
date: '2013-11-19'
|
@@ -34,7 +34,7 @@ module Minitest
|
|
34
34
|
|
35
35
|
reporter.start
|
36
36
|
__run reporter, options
|
37
|
-
self.parallel_executor.shutdown
|
37
|
+
self.parallel_executor.shutdown if VERSION > "5.0.8"
|
38
38
|
reporter.report
|
39
39
|
|
40
40
|
reporter.passed?
|
@@ -43,9 +43,9 @@ module Minitest
|
|
43
43
|
##
|
44
44
|
# Create default composite reporter.
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# which arguments to use.
|
46
|
+
# Some reporters take no arguments, some take just `options` and others
|
47
|
+
# take `io` and `options`, so the length of the method parameters is
|
48
|
+
# used to determine which arguments to use.
|
49
49
|
|
50
50
|
def self.default_reporter(options)
|
51
51
|
reporter = CompositeReporter.new
|
@@ -54,9 +54,15 @@ module Minitest
|
|
54
54
|
reporter << (
|
55
55
|
case rpt
|
56
56
|
when Class
|
57
|
-
|
57
|
+
params = rpt.instance_method(:initialize).parameters
|
58
|
+
case params.size #arity
|
58
59
|
when 0 then rpt.new
|
59
|
-
when 1
|
60
|
+
when 1 then
|
61
|
+
if params == [[:rest]] # best guess
|
62
|
+
rpt.new(options[:io], options)
|
63
|
+
else
|
64
|
+
rpt.new(options)
|
65
|
+
end
|
60
66
|
else rpt.new(options[:io], options)
|
61
67
|
end
|
62
68
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-reporter-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- trans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|