minitest-ci 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/minitest/ci.rb +12 -3
- data/test/test_minitest_ci.rb +1 -1
- metadata +4 -4
data/lib/minitest/ci.rb
CHANGED
@@ -7,7 +7,7 @@ require 'cgi'
|
|
7
7
|
|
8
8
|
module MiniTest
|
9
9
|
module Ci
|
10
|
-
VERSION = '1.0.
|
10
|
+
VERSION = '1.0.2'
|
11
11
|
|
12
12
|
@test_dir = nil #'test/reports'
|
13
13
|
@error = nil
|
@@ -78,9 +78,9 @@ module MiniTest
|
|
78
78
|
f.puts " <testcase time='#{"%6f" % time}' name='#{method}' assertions='#{asserts}'>"
|
79
79
|
if error
|
80
80
|
bt = MiniTest::filter_backtrace(error.backtrace).join "\n"
|
81
|
-
f.write "
|
81
|
+
f.write " <#{type error} type='#{error.class}' message='#{CGI.escapeHTML(error.message)}'>"
|
82
82
|
f.puts CGI.escapeHTML(bt)
|
83
|
-
f.puts "
|
83
|
+
f.puts " </#{type error}>"
|
84
84
|
end
|
85
85
|
f.puts " </testcase>"
|
86
86
|
end
|
@@ -89,6 +89,15 @@ module MiniTest
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
+
def type e
|
93
|
+
case e
|
94
|
+
when MiniTest::Skip
|
95
|
+
'skipped'
|
96
|
+
else
|
97
|
+
'failure'
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
92
101
|
extend self
|
93
102
|
end
|
94
103
|
|
data/test/test_minitest_ci.rb
CHANGED
@@ -75,7 +75,7 @@ class TestMinitest::TestCi < MiniTest::Unit::TestCase
|
|
75
75
|
assert_equal '1', passed['assertions']
|
76
76
|
|
77
77
|
skipped = @doc.at_xpath('/testsuite/testcase[@name="test_skip_assertion"]')
|
78
|
-
assert_equal 'skip assertion', skipped.at_xpath('
|
78
|
+
assert_equal 'skip assertion', skipped.at_xpath('skipped')['message']
|
79
79
|
assert_equal '0', skipped['assertions']
|
80
80
|
|
81
81
|
failure = @doc.at_xpath('/testsuite/testcase[@name="test_fail_assertion"]')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-ci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Henderson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-27 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|