minitest-junit 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/minitest/junit/version.rb +1 -1
- data/lib/minitest/junit.rb +2 -2
- data/minitest-junit.gemspec +1 -1
- data/test/testcase_formatter_test.rb +11 -3
- metadata +1 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb01cc706e87563df21ee3ac59414bea9dc4a72b321daa289daf264e4b69625f
|
4
|
+
data.tar.gz: 79494de211ef61d553f06fd802708b6364514b7143f7f010ba604283c5a751a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 917d4fb7ce3de650069496ed1b599e30661040cac256f543263cc0104d73d82823f291c336040a0dc8f588c7a4b46a1ce1f61b9a06382d880c729c5034a5a7b1
|
7
|
+
data.tar.gz: 5ed9083720ab9b4f9b0caa185cfe8d1577b216f2c82b808c70d9a08df3bc6daab61472d2ed97e4479803cce8d84fa93dae56e3c070c4a9542b55493afd0d2852
|
data/lib/minitest/junit.rb
CHANGED
data/minitest-junit.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(/^(test)\//)
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'minitest', '~> 5.
|
21
|
+
spec.add_dependency 'minitest', '~> 5.11'
|
22
22
|
spec.add_dependency 'builder', '~> 3.2'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler'
|
@@ -4,6 +4,14 @@ require 'time'
|
|
4
4
|
|
5
5
|
require 'minitest/junit'
|
6
6
|
|
7
|
+
class FakeTestName; end
|
8
|
+
|
9
|
+
module FirstModule
|
10
|
+
module SecondModule
|
11
|
+
class TestClass; end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
7
15
|
class TestCaseFormatter < Minitest::Test
|
8
16
|
def test_all_tests_generate_testcase_tag
|
9
17
|
test = create_test_result
|
@@ -46,7 +54,7 @@ class TestCaseFormatter < Minitest::Test
|
|
46
54
|
end
|
47
55
|
|
48
56
|
def test_jenkins_sanitizer_uses_modules_as_packages
|
49
|
-
test = create_test_result
|
57
|
+
test = create_test_result FirstModule::SecondModule::TestClass
|
50
58
|
reporter = create_reporter junit_jenkins: true
|
51
59
|
reporter.record test
|
52
60
|
|
@@ -63,7 +71,7 @@ class TestCaseFormatter < Minitest::Test
|
|
63
71
|
e
|
64
72
|
end
|
65
73
|
|
66
|
-
def create_test_result(name =
|
74
|
+
def create_test_result(name = FakeTestName)
|
67
75
|
test = Class.new Minitest::Test do
|
68
76
|
define_method 'class' do
|
69
77
|
name
|
@@ -71,7 +79,7 @@ class TestCaseFormatter < Minitest::Test
|
|
71
79
|
end.new 'test_method_name'
|
72
80
|
test.time = a_number
|
73
81
|
test.assertions = a_number
|
74
|
-
test
|
82
|
+
Minitest::Result.from test
|
75
83
|
end
|
76
84
|
|
77
85
|
def a_number
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-junit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allan Espinosa
|
@@ -15,9 +15,6 @@ dependencies:
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '5.0'
|
20
|
-
- - "<"
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '5.11'
|
23
20
|
type: :runtime
|
@@ -25,9 +22,6 @@ dependencies:
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '5.0'
|
30
|
-
- - "<"
|
31
25
|
- !ruby/object:Gem::Version
|
32
26
|
version: '5.11'
|
33
27
|
- !ruby/object:Gem::Dependency
|