minitest-reporters 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/minitest/minitest_reporter_plugin.rb +1 -1
- data/lib/minitest/reporters/progress_reporter.rb +3 -2
- data/lib/minitest/reporters/version.rb +1 -1
- data/test/{integration/fixtures → fixtures}/junit_filename_bug_example_test.rb +0 -0
- data/test/fixtures/progress_detailed_skip_test.rb +8 -0
- data/test/fixtures/progress_test.rb +8 -0
- data/test/fixtures/sample_test.rb +15 -0
- data/test/integration/reporters/junit_reporter_test.rb +1 -1
- data/test/integration/reporters/progress_reporter_test.rb +22 -0
- metadata +12 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92e61c0020d2e663b9cb9fb7cf1f6a24e39538dd
|
4
|
+
data.tar.gz: 85ab14f1d378f773157479bffb1b96ee2b0346b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e9f1b3cd940f6e84e980118df9752a8a3845f12d2db1616aa6091d7b71af2b7498083ebe28a03bfde789450b076a311f05c47fa9fd49de9c02172f7711bbf64
|
7
|
+
data.tar.gz: c0e9060b8d3d13755d054e5ba5bb24e0fd4d198e561988057c998bf4e50e16543d5e9620696965050c1ce485a6390f093feaaf05d8ce2bea952e4323967e6a3f
|
data/README.md
CHANGED
@@ -84,7 +84,7 @@ do this in `test_helper.rb`:
|
|
84
84
|
Minitest.backtrace_filter
|
85
85
|
)
|
86
86
|
|
87
|
-
The third parameter to `.
|
87
|
+
The third parameter to `.use!`, in this case `Minitest.backtrace_filter`, should be a
|
88
88
|
filter object. In the above example, you're telling minitest-reporters to use the filter
|
89
89
|
that Rails has already set.
|
90
90
|
|
@@ -5,7 +5,7 @@ module Minitest
|
|
5
5
|
reporter.reporters = Minitest::Reporters.reporters + guard_reporter
|
6
6
|
reporter.reporters.each do |reporter|
|
7
7
|
reporter.io = options[:io]
|
8
|
-
reporter.add_defaults(options.merge(:total_count => total_count(options)))
|
8
|
+
reporter.add_defaults(options.merge(:total_count => total_count(options))) if reporter.respond_to? :add_defaults
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -40,12 +40,13 @@ module Minitest
|
|
40
40
|
|
41
41
|
def record(test)
|
42
42
|
super
|
43
|
-
if
|
43
|
+
return if test.skipped? && !@detailed_skip
|
44
|
+
if test.failure
|
44
45
|
print "\e[0m\e[1000D\e[K"
|
45
46
|
print_colored_status(test)
|
46
47
|
print_test_with_time(test)
|
47
48
|
puts
|
48
|
-
print_info(test.failure, test.error?)
|
49
|
+
print_info(test.failure, test.error?)
|
49
50
|
puts
|
50
51
|
end
|
51
52
|
|
File without changes
|
@@ -3,7 +3,7 @@ require_relative "../../test_helper"
|
|
3
3
|
module MinitestReportersTest
|
4
4
|
class JUnitReporterTest < TestCase
|
5
5
|
def test_replaces_special_characters_for_filenames_and_doesnt_crash
|
6
|
-
fixtures_directory = File.expand_path('
|
6
|
+
fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
|
7
7
|
test_filename = File.join(fixtures_directory, 'junit_filename_bug_example_test.rb')
|
8
8
|
output = `ruby #{test_filename} 2>&1`
|
9
9
|
refute_match 'No such file or directory', output
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require_relative "../../test_helper"
|
2
|
+
|
3
|
+
module MinitestReportersTest
|
4
|
+
class ProgressReporterTest < TestCase
|
5
|
+
def test_all_failures_are_displayed
|
6
|
+
fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
|
7
|
+
test_filename = File.join(fixtures_directory, 'progress_test.rb')
|
8
|
+
output = `ruby #{test_filename} 2>&1`
|
9
|
+
assert_match 'ERROR["test_error"', output, 'Errors should be displayed'
|
10
|
+
assert_match 'FAIL["test_failure"', output, 'Failures should be displayed'
|
11
|
+
assert_match 'SKIP["test_skip', output, 'Skipped tests should be displayed'
|
12
|
+
end
|
13
|
+
def test_skipped_tests_are_not_displayed
|
14
|
+
fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
|
15
|
+
test_filename = File.join(fixtures_directory, 'progress_detailed_skip_test.rb')
|
16
|
+
output = `ruby #{test_filename} 2>&1`
|
17
|
+
assert_match 'ERROR["test_error"', output, 'Errors should be displayed'
|
18
|
+
assert_match 'FAIL["test_failure"', output, 'Failures should be displayed'
|
19
|
+
refute_match 'SKIP["test_skip', output, 'Skipped tests should not be displayed'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -127,10 +127,14 @@ files:
|
|
127
127
|
- lib/minitest/reporters/spec_reporter.rb
|
128
128
|
- lib/minitest/reporters/version.rb
|
129
129
|
- minitest-reporters.gemspec
|
130
|
+
- test/fixtures/junit_filename_bug_example_test.rb
|
131
|
+
- test/fixtures/progress_detailed_skip_test.rb
|
132
|
+
- test/fixtures/progress_test.rb
|
133
|
+
- test/fixtures/sample_test.rb
|
130
134
|
- test/gallery/bad_test.rb
|
131
135
|
- test/gallery/good_test.rb
|
132
|
-
- test/integration/fixtures/junit_filename_bug_example_test.rb
|
133
136
|
- test/integration/reporters/junit_reporter_test.rb
|
137
|
+
- test/integration/reporters/progress_reporter_test.rb
|
134
138
|
- test/test_helper.rb
|
135
139
|
- test/unit/minitest/extensible_backtrace_filter_test.rb
|
136
140
|
- test/unit/minitest/reporters_test.rb
|
@@ -158,10 +162,14 @@ signing_key:
|
|
158
162
|
specification_version: 4
|
159
163
|
summary: Create customizable Minitest output formats
|
160
164
|
test_files:
|
165
|
+
- test/fixtures/junit_filename_bug_example_test.rb
|
166
|
+
- test/fixtures/progress_detailed_skip_test.rb
|
167
|
+
- test/fixtures/progress_test.rb
|
168
|
+
- test/fixtures/sample_test.rb
|
161
169
|
- test/gallery/bad_test.rb
|
162
170
|
- test/gallery/good_test.rb
|
163
|
-
- test/integration/fixtures/junit_filename_bug_example_test.rb
|
164
171
|
- test/integration/reporters/junit_reporter_test.rb
|
172
|
+
- test/integration/reporters/progress_reporter_test.rb
|
165
173
|
- test/test_helper.rb
|
166
174
|
- test/unit/minitest/extensible_backtrace_filter_test.rb
|
167
175
|
- test/unit/minitest/reporters_test.rb
|