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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fa66307fd2fdfd6109450defbb4413afdf292d773222c93a04622680ebb6c37
4
- data.tar.gz: 103ddd1223b0d692972416eb0551e072f06734658069906a986f9d0c1975a16f
3
+ metadata.gz: bb01cc706e87563df21ee3ac59414bea9dc4a72b321daa289daf264e4b69625f
4
+ data.tar.gz: 79494de211ef61d553f06fd802708b6364514b7143f7f010ba604283c5a751a9
5
5
  SHA512:
6
- metadata.gz: 4c4dabfdcf0a30f2dc9d858962444d88fa445983404189b3fce805374f23d64c2c3ed43e044f5275bb68446ffe7b72365fc9e2d8bb82fcab58d9320103204a24
7
- data.tar.gz: 5777cfd69357a6855de6e5609d8e1c5cc6a227ae670fe4abaef56ce28d10e9b579e1aeef0022cc5dc00731cd5bb31829b22f6c8a14b232cbf25df43eb15d3122
6
+ metadata.gz: 917d4fb7ce3de650069496ed1b599e30661040cac256f543263cc0104d73d82823f291c336040a0dc8f588c7a4b46a1ce1f61b9a06382d880c729c5034a5a7b1
7
+ data.tar.gz: 5ed9083720ab9b4f9b0caa185cfe8d1577b216f2c82b808c70d9a08df3bc6daab61472d2ed97e4479803cce8d84fa93dae56e3c070c4a9542b55493afd0d2852
@@ -1,6 +1,6 @@
1
1
  module Minitest
2
2
  # :nodoc:
3
3
  module Junit
4
- VERSION = '0.4.0'
4
+ VERSION = '1.0.0'
5
5
  end
6
6
  end
@@ -61,9 +61,9 @@ module Minitest
61
61
 
62
62
  def format_class(result)
63
63
  if @options[:junit_jenkins]
64
- result.class.to_s.gsub(/(.*)::(.*)/, '\1.\2')
64
+ result.klass.to_s.gsub(/(.*)::(.*)/, '\1.\2')
65
65
  else
66
- result.class
66
+ result.klass
67
67
  end
68
68
  end
69
69
 
@@ -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.0', '< 5.11'
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 'FirstModule::SecondModule::TestClass'
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 = 'ATestClass')
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.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