minitest-reporters 1.0.5 → 1.0.6
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/README.md +23 -0
- data/lib/minitest/reporters/base_reporter.rb +0 -1
- data/lib/minitest/reporters/default_reporter.rb +12 -2
- data/lib/minitest/reporters/progress_reporter.rb +1 -1
- data/lib/minitest/reporters/ruby_mate_reporter.rb +1 -1
- data/lib/minitest/reporters/rubymine_reporter.rb +1 -1
- data/lib/minitest/reporters/spec_reporter.rb +1 -1
- data/lib/minitest/reporters/version.rb +1 -1
- 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: 407feb8fed7084f2c0d0af4e07a9b4724c25ee1d
|
4
|
+
data.tar.gz: fd92d41b73c5d644d90d0c04068e3b9da6b03156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f69b153445c9c74fd98bdc69e19a6d8f5348d6db388c9dbca42b49b3e8345ac2cb652e616ff9eae7859e996aecc3cf6cca7be324ca88683663bda59ceeba755
|
7
|
+
data.tar.gz: 13ff07c33e2c98bb080b58c2ad6473eb2a8b4ec4577be165f81e21cbeffdd5d4399a07c0ef8d8ec9082fe1c5f41dbdf15825e372b919fc4620d3dc3b02ab7eb0
|
data/README.md
CHANGED
@@ -65,6 +65,29 @@ Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(:color => tru
|
|
65
65
|
|
66
66
|
If you are using minitest-reporters with ActiveSupport 3.x, make sure that you require ActiveSupport before invoking `Minitest::Reporters.use!`. Minitest-reporters fixes incompatibilities caused by monkey patches in ActiveSupport 3.x. ActiveSupport 4.x is unaffected.
|
67
67
|
|
68
|
+
**Rails Backtrace Filtering and Custom Backtrace Filtering**
|
69
|
+
|
70
|
+
Minitest lets you configures your own, custom backtrace filter via
|
71
|
+
`Minitest.backtrace_filter=`. If you're using Rails, then by default
|
72
|
+
`Minitest.backtrace_filter` is a filter designed specially for Rails.
|
73
|
+
|
74
|
+
But minitest-reporters overwrites `Minitest.backtrace_filter` by default. That means it
|
75
|
+
will overwrite your custom filter and Rails' default filter. (You'll know this is
|
76
|
+
happening if you see overly long or otherwise unexpected backtraces.)
|
77
|
+
|
78
|
+
To avoid that, you must manually tell minitest-reporters which filter to use. In Rails,
|
79
|
+
do this in `test_helper.rb`:
|
80
|
+
|
81
|
+
Minitest::Reporters.use!(
|
82
|
+
Minitest::Reporters::DefaultReporter.new,
|
83
|
+
ENV,
|
84
|
+
Minitest.backtrace_filter
|
85
|
+
)
|
86
|
+
|
87
|
+
The third parameter to `.new`, in this case `Minitest.backtrace_filter`, should be a
|
88
|
+
filter object. In the above example, you're telling minitest-reporters to use the filter
|
89
|
+
that Rails has already set.
|
90
|
+
|
68
91
|
## Note on Patches/Pull Requests ##
|
69
92
|
|
70
93
|
* Fork the project.
|
@@ -25,7 +25,7 @@ module Minitest
|
|
25
25
|
def start
|
26
26
|
super
|
27
27
|
puts
|
28
|
-
puts
|
28
|
+
puts("# Running tests with run options %s:" % options[:args])
|
29
29
|
puts
|
30
30
|
end
|
31
31
|
|
@@ -41,7 +41,8 @@ module Minitest
|
|
41
41
|
|
42
42
|
def after_suite(suite)
|
43
43
|
super
|
44
|
-
|
44
|
+
duration = suite_duration(suite)
|
45
|
+
@suite_times << [suite.name, duration]
|
45
46
|
end
|
46
47
|
|
47
48
|
def record(test)
|
@@ -194,6 +195,15 @@ module Minitest
|
|
194
195
|
'%d tests, %d assertions, %d failures, %d errors, %d skips' %
|
195
196
|
[count, assertions, failures, errors, skips]
|
196
197
|
end
|
198
|
+
|
199
|
+
def suite_duration(suite)
|
200
|
+
start_time = @suite_start_times.delete(suite)
|
201
|
+
if start_time.nil?
|
202
|
+
0
|
203
|
+
else
|
204
|
+
Time.now - start_time
|
205
|
+
end
|
206
|
+
end
|
197
207
|
end
|
198
208
|
end
|
199
209
|
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: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|