minitest-reporters 1.3.6 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +28 -27
- data/.rubocop.yml +77 -77
- data/.ruby-gemset +1 -1
- data/.travis.yml +14 -14
- data/.yardopts +5 -5
- data/CHANGELOG.md +98 -93
- data/Gemfile +2 -2
- data/LICENSE +20 -20
- data/README.md +135 -135
- data/Rakefile +70 -70
- data/appveyor.yml +22 -22
- data/lib/minitest/extensible_backtrace_filter.rb +67 -67
- data/lib/minitest/minitest_reporter_plugin.rb +76 -76
- data/lib/minitest/old_activesupport_fix.rb +24 -24
- data/lib/minitest/relative_position.rb +26 -26
- data/lib/minitest/reporters.rb +91 -91
- data/lib/minitest/reporters/ansi.rb +30 -30
- data/lib/minitest/reporters/base_reporter.rb +136 -136
- data/lib/minitest/reporters/default_reporter.rb +228 -228
- data/lib/minitest/reporters/html_reporter.rb +224 -224
- data/lib/minitest/reporters/junit_reporter.rb +168 -164
- data/lib/minitest/reporters/mean_time_reporter.rb +388 -388
- data/lib/minitest/reporters/progress_reporter.rb +102 -96
- data/lib/minitest/reporters/ruby_mate_reporter.rb +54 -54
- data/lib/minitest/reporters/rubymine_reporter.rb +116 -116
- data/lib/minitest/reporters/spec_reporter.rb +61 -61
- data/lib/minitest/reporters/version.rb +5 -5
- data/lib/minitest/templates/index.html.erb +82 -82
- data/minitest-reporters.gemspec +31 -32
- data/test/fixtures/junit_filename_bug_example_test.rb +41 -41
- data/test/fixtures/mean_time_test.rb +36 -36
- data/test/fixtures/progress_detailed_skip_test.rb +8 -8
- data/test/fixtures/progress_test.rb +8 -8
- data/test/fixtures/sample_test.rb +15 -15
- data/test/fixtures/spec_test.rb +18 -18
- data/test/gallery/bad_test.rb +25 -25
- data/test/gallery/good_test.rb +14 -14
- data/test/integration/reporters/junit_reporter_test.rb +12 -12
- data/test/integration/reporters/mean_time_reporter_test.rb +7 -7
- data/test/integration/reporters/progress_reporter_test.rb +40 -40
- data/test/test_helper.rb +22 -22
- data/test/unit/minitest/extensible_backtrace_filter_test.rb +42 -42
- data/test/unit/minitest/junit_reporter_test.rb +46 -23
- data/test/unit/minitest/mean_time_reporter_unit_test.rb +149 -149
- data/test/unit/minitest/minitest_reporter_plugin_test.rb +14 -14
- data/test/unit/minitest/reporters_test.rb +65 -65
- data/test/unit/minitest/spec_reporter_test.rb +62 -62
- metadata +22 -5
@@ -1,62 +1,62 @@
|
|
1
|
-
require_relative "../../test_helper"
|
2
|
-
|
3
|
-
module MinitestReportersTest
|
4
|
-
class SpecReporterTest < Minitest::Test
|
5
|
-
def setup
|
6
|
-
@reporter = Minitest::Reporters::SpecReporter.new
|
7
|
-
@test = Minitest::Test.new("")
|
8
|
-
@test.time = 0
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_removes_underscore_in_name_if_shoulda
|
12
|
-
@test.name = "test_: Should foo"
|
13
|
-
assert_output(/test:/) do
|
14
|
-
@reporter.io = $stdout
|
15
|
-
@reporter.record(@test)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def test_wont_modify_name_if_not_shoulda
|
20
|
-
@test.name = "test_foo"
|
21
|
-
assert_output(/test_foo/) do
|
22
|
-
@reporter.io = $stdout
|
23
|
-
@reporter.record(@test)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_responds_to_test_name_after_record
|
28
|
-
test_name = 'test_: Should foo'
|
29
|
-
the_test_class = Class.new(Minitest::Test) do
|
30
|
-
define_method test_name do
|
31
|
-
assert(false)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
the_test = the_test_class.new('')
|
35
|
-
the_test.name = test_name
|
36
|
-
@reporter.io = StringIO.new
|
37
|
-
@reporter.record(the_test)
|
38
|
-
assert_respond_to the_test, the_test.name
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_report_for_describe_not_using_const
|
42
|
-
klass = describe("whatever") { it("passes") { assert true } }
|
43
|
-
runnable = klass.runnable_methods.first
|
44
|
-
@reporter.io = StringIO.new
|
45
|
-
|
46
|
-
# Run the test
|
47
|
-
result = klass.new(runnable).run
|
48
|
-
@reporter.start
|
49
|
-
@reporter.record(result)
|
50
|
-
|
51
|
-
error_msg = nil
|
52
|
-
begin
|
53
|
-
@reporter.report
|
54
|
-
rescue => e
|
55
|
-
error_msg = "error executing @reporter.report, #{e}"
|
56
|
-
end
|
57
|
-
|
58
|
-
refute error_msg, error_msg
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
1
|
+
require_relative "../../test_helper"
|
2
|
+
|
3
|
+
module MinitestReportersTest
|
4
|
+
class SpecReporterTest < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@reporter = Minitest::Reporters::SpecReporter.new
|
7
|
+
@test = Minitest::Test.new("")
|
8
|
+
@test.time = 0
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_removes_underscore_in_name_if_shoulda
|
12
|
+
@test.name = "test_: Should foo"
|
13
|
+
assert_output(/test:/) do
|
14
|
+
@reporter.io = $stdout
|
15
|
+
@reporter.record(@test)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_wont_modify_name_if_not_shoulda
|
20
|
+
@test.name = "test_foo"
|
21
|
+
assert_output(/test_foo/) do
|
22
|
+
@reporter.io = $stdout
|
23
|
+
@reporter.record(@test)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_responds_to_test_name_after_record
|
28
|
+
test_name = 'test_: Should foo'
|
29
|
+
the_test_class = Class.new(Minitest::Test) do
|
30
|
+
define_method test_name do
|
31
|
+
assert(false)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
the_test = the_test_class.new('')
|
35
|
+
the_test.name = test_name
|
36
|
+
@reporter.io = StringIO.new
|
37
|
+
@reporter.record(the_test)
|
38
|
+
assert_respond_to the_test, the_test.name
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_report_for_describe_not_using_const
|
42
|
+
klass = describe("whatever") { it("passes") { assert true } }
|
43
|
+
runnable = klass.runnable_methods.first
|
44
|
+
@reporter.io = StringIO.new
|
45
|
+
|
46
|
+
# Run the test
|
47
|
+
result = klass.new(runnable).run
|
48
|
+
@reporter.start
|
49
|
+
@reporter.record(result)
|
50
|
+
|
51
|
+
error_msg = nil
|
52
|
+
begin
|
53
|
+
@reporter.report
|
54
|
+
rescue => e
|
55
|
+
error_msg = "error executing @reporter.report, #{e}"
|
56
|
+
end
|
57
|
+
|
58
|
+
refute error_msg, error_msg
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
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.3.
|
4
|
+
version: 1.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -185,9 +185,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
- !ruby/object:Gem::Version
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
|
-
|
189
|
-
rubygems_version: 2.7.6
|
188
|
+
rubygems_version: 3.0.3
|
190
189
|
signing_key:
|
191
190
|
specification_version: 4
|
192
191
|
summary: Create customizable Minitest output formats
|
193
|
-
test_files:
|
192
|
+
test_files:
|
193
|
+
- test/fixtures/junit_filename_bug_example_test.rb
|
194
|
+
- test/fixtures/mean_time_test.rb
|
195
|
+
- test/fixtures/progress_detailed_skip_test.rb
|
196
|
+
- test/fixtures/progress_test.rb
|
197
|
+
- test/fixtures/sample_test.rb
|
198
|
+
- test/fixtures/spec_test.rb
|
199
|
+
- test/gallery/bad_test.rb
|
200
|
+
- test/gallery/good_test.rb
|
201
|
+
- test/integration/reporters/junit_reporter_test.rb
|
202
|
+
- test/integration/reporters/mean_time_reporter_test.rb
|
203
|
+
- test/integration/reporters/progress_reporter_test.rb
|
204
|
+
- test/test_helper.rb
|
205
|
+
- test/unit/minitest/extensible_backtrace_filter_test.rb
|
206
|
+
- test/unit/minitest/junit_reporter_test.rb
|
207
|
+
- test/unit/minitest/mean_time_reporter_unit_test.rb
|
208
|
+
- test/unit/minitest/minitest_reporter_plugin_test.rb
|
209
|
+
- test/unit/minitest/reporters_test.rb
|
210
|
+
- test/unit/minitest/spec_reporter_test.rb
|