yarjuf 1.0.6 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/HISTORY.txt +4 -0
- data/README.md +1 -0
- data/features/basic.feature +1 -1
- data/features/individual_suites.feature +12 -9
- data/features/individual_tests.feature +5 -4
- data/features/step_definitions/individual_suite_details_steps.rb +9 -9
- data/features/step_definitions/individual_tests_steps.rb +8 -8
- data/features/step_definitions/infrastructure_steps.rb +1 -1
- data/features/step_definitions/suite_level_details_steps.rb +15 -15
- data/features/suite_level_details.feature +6 -5
- data/lib/yarjuf.rb +2 -1
- data/lib/yarjuf/j_unit.rb +53 -46
- data/lib/yarjuf/version.rb +1 -1
- data/yarjuf.gemspec +6 -6
- metadata +21 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ca383f472dd571a3f2fa2d8bcf1fb665cac3cfb
|
4
|
+
data.tar.gz: ddcf57f2f996f11eb45a380576c1d911b1ae36f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83c2a2dc1f687680947262ca1c48bbee1c1f03b0ff9ddf2577d29343c35caebeb6559ee98e0f1be93bf4974b0c47dc43d6e3f5ac9ec545b0f05f848fc1d6aa96
|
7
|
+
data.tar.gz: 2ad41303ff655d3b70ca08e5da64a7057a309db46718fc25bf933113c0b7150542c71931ab4a3bb2b2e8226637114018c839af845bee501b8236901698c20f18
|
data/HISTORY.txt
CHANGED
data/README.md
CHANGED
@@ -97,6 +97,7 @@ in the `-o` option above.
|
|
97
97
|
|
98
98
|
## Acknowledgements
|
99
99
|
|
100
|
+
* Thanks to [@bsnape](https://github.com/bsnape) for the rspec 3 compatibility patch
|
100
101
|
* Thanks to [@adeoke](https://github.com/adeoke) for suggesting a slightly less sucky gem name than the
|
101
102
|
one I originally came up with
|
102
103
|
* Thanks to [@dchamb84](https://github.com/dchamb84) for helping me debug the original hack
|
data/features/basic.feature
CHANGED
@@ -8,7 +8,7 @@ Feature: Individual suites
|
|
8
8
|
"""
|
9
9
|
describe "suite one" do
|
10
10
|
it "should contain one test" do
|
11
|
-
1.
|
11
|
+
expect(1).to eq 1
|
12
12
|
end
|
13
13
|
end
|
14
14
|
"""
|
@@ -16,7 +16,7 @@ Feature: Individual suites
|
|
16
16
|
"""
|
17
17
|
describe "suite two" do
|
18
18
|
it "should also contain one test" do
|
19
|
-
1.
|
19
|
+
expect(1).to eq 1
|
20
20
|
end
|
21
21
|
end
|
22
22
|
"""
|
@@ -29,19 +29,20 @@ Feature: Individual suites
|
|
29
29
|
"""
|
30
30
|
describe "suite one" do
|
31
31
|
it "should contain one passing test" do
|
32
|
-
1.
|
32
|
+
expect(1).to eq 1
|
33
33
|
end
|
34
34
|
|
35
35
|
it "should contain one of two failing tests" do
|
36
|
-
1.
|
36
|
+
expect(1).to eq 2
|
37
37
|
end
|
38
38
|
|
39
39
|
it "should contain two of two failing tests" do
|
40
|
-
1.
|
40
|
+
expect(1).to eq 2
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should contain 1 pending test" do
|
44
44
|
pending
|
45
|
+
fail
|
45
46
|
end
|
46
47
|
end
|
47
48
|
"""
|
@@ -49,27 +50,29 @@ Feature: Individual suites
|
|
49
50
|
"""
|
50
51
|
describe "suite two" do
|
51
52
|
it "should contain one of 3 passing tests" do
|
52
|
-
1.
|
53
|
+
expect(1).to eq 1
|
53
54
|
end
|
54
55
|
|
55
56
|
it "should contain two of 3 passing tests" do
|
56
|
-
1.
|
57
|
+
expect(1).to eq 1
|
57
58
|
end
|
58
59
|
|
59
60
|
it "should contain three of 3 passing tests" do
|
60
|
-
1.
|
61
|
+
expect(1).to eq 1
|
61
62
|
end
|
62
63
|
|
63
64
|
it "should contain one failing test" do
|
64
|
-
1.
|
65
|
+
expect(1).to eq 2
|
65
66
|
end
|
66
67
|
|
67
68
|
it "should contain one of two pending tests" do
|
68
69
|
pending
|
70
|
+
fail
|
69
71
|
end
|
70
72
|
|
71
73
|
it "should contain two of two pending tests" do
|
72
74
|
pending
|
75
|
+
fail
|
73
76
|
end
|
74
77
|
end
|
75
78
|
"""
|
@@ -8,7 +8,7 @@ Feature: Individual Tests
|
|
8
8
|
"""
|
9
9
|
describe "suite one" do
|
10
10
|
it "simple name" do
|
11
|
-
1.
|
11
|
+
expect(1).to eq 1
|
12
12
|
end
|
13
13
|
end
|
14
14
|
"""
|
@@ -24,7 +24,7 @@ Feature: Individual Tests
|
|
24
24
|
context "really" do
|
25
25
|
context "deep" do
|
26
26
|
it "should still be displayed nicely" do
|
27
|
-
1.
|
27
|
+
expect(1).to eq 1
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -40,7 +40,7 @@ Feature: Individual Tests
|
|
40
40
|
"""
|
41
41
|
describe "suite one" do
|
42
42
|
it "should do something" do
|
43
|
-
1.
|
43
|
+
expect(1).to eq 1
|
44
44
|
end
|
45
45
|
end
|
46
46
|
"""
|
@@ -53,6 +53,7 @@ Feature: Individual Tests
|
|
53
53
|
describe "suite one" do
|
54
54
|
it "should be pending" do
|
55
55
|
pending
|
56
|
+
fail
|
56
57
|
end
|
57
58
|
end
|
58
59
|
"""
|
@@ -64,7 +65,7 @@ Feature: Individual Tests
|
|
64
65
|
"""
|
65
66
|
describe "suite one" do
|
66
67
|
it "should be failing" do
|
67
|
-
1.
|
68
|
+
expect(1).to eq 2
|
68
69
|
end
|
69
70
|
end
|
70
71
|
"""
|
@@ -1,24 +1,24 @@
|
|
1
1
|
Then /^the junit output file contains two testsuite elements named 'suite one' and 'suite two'$/ do
|
2
2
|
step 'I parse the junit results file'
|
3
|
-
@results.xpath("/testsuites/testsuite").size.
|
4
|
-
@results.xpath("/testsuites/testsuite/@name").map(&:text).sort.
|
3
|
+
expect(@results.xpath("/testsuites/testsuite").size).to eq 2
|
4
|
+
expect(@results.xpath("/testsuites/testsuite/@name").map(&:text).sort).to match_array ["suite one", "suite two"]
|
5
5
|
end
|
6
6
|
|
7
7
|
Then /^the junit output file has one test against each suite$/ do
|
8
8
|
step 'I parse the junit results file'
|
9
|
-
@results.xpath("/testsuites/testsuite/@tests").map(&:text).
|
9
|
+
expect(@results.xpath("/testsuites/testsuite/@tests").map(&:text)).to match_array ["1", "1"]
|
10
10
|
end
|
11
11
|
|
12
12
|
Then /^the junit output file has the correct test counts against each suite$/ do
|
13
13
|
step 'I parse the junit results file'
|
14
14
|
#suite one
|
15
|
-
@results.at_xpath("/testsuites/testsuite[@name='suite one']/@tests").value.
|
16
|
-
@results.at_xpath("/testsuites/testsuite[@name='suite one']/@failures").value.
|
17
|
-
@results.at_xpath("/testsuites/testsuite[@name='suite one']/@skipped").value.
|
15
|
+
expect(@results.at_xpath("/testsuites/testsuite[@name='suite one']/@tests").value).to eq "4"
|
16
|
+
expect(@results.at_xpath("/testsuites/testsuite[@name='suite one']/@failures").value).to eq "2"
|
17
|
+
expect(@results.at_xpath("/testsuites/testsuite[@name='suite one']/@skipped").value).to eq "1"
|
18
18
|
|
19
19
|
#suite two
|
20
|
-
@results.at_xpath("/testsuites/testsuite[@name='suite two']/@tests").value.
|
21
|
-
@results.at_xpath("/testsuites/testsuite[@name='suite two']/@failures").value.
|
22
|
-
@results.at_xpath("/testsuites/testsuite[@name='suite two']/@skipped").value.
|
20
|
+
expect(@results.at_xpath("/testsuites/testsuite[@name='suite two']/@tests").value).to eq "6"
|
21
|
+
expect(@results.at_xpath("/testsuites/testsuite[@name='suite two']/@failures").value).to eq "1"
|
22
|
+
expect(@results.at_xpath("/testsuites/testsuite[@name='suite two']/@skipped").value).to eq "2"
|
23
23
|
end
|
24
24
|
|
@@ -1,28 +1,28 @@
|
|
1
1
|
Then /^the junit output file contains a test result with a simple name$/ do
|
2
2
|
step 'I parse the junit results file'
|
3
|
-
@results.at_xpath("/testsuites/testsuite[@name='suite one']/testcase/@name").value.
|
3
|
+
expect(@results.at_xpath("/testsuites/testsuite[@name='suite one']/testcase/@name").value).to eq "suite one simple name"
|
4
4
|
end
|
5
5
|
|
6
6
|
Then /^the junit output file has a nicely rendered nested test name$/ do
|
7
7
|
step 'I parse the junit results file'
|
8
|
-
@results.at_xpath("/testsuites/testsuite/testcase/@name").value.
|
8
|
+
expect(@results.at_xpath("/testsuites/testsuite/testcase/@name").value).to eq "something that is really deep should still be displayed nicely"
|
9
9
|
end
|
10
10
|
|
11
11
|
Then /^the junit output file contains a test with a duration$/ do
|
12
12
|
step 'I parse the junit results file'
|
13
|
-
@results.at_xpath("/testsuites/testsuite/testcase/@time").value.
|
13
|
+
expect(@results.at_xpath("/testsuites/testsuite/testcase/@time").value).to match /[.0-9]+/
|
14
14
|
end
|
15
15
|
|
16
16
|
Then /^the junit output file contains a pending test$/ do
|
17
17
|
step 'I parse the junit results file'
|
18
|
-
@results.at_xpath("/testsuites/testsuite/testcase/skipped").
|
18
|
+
expect(@results.at_xpath("/testsuites/testsuite/testcase/skipped")).to_not be_nil
|
19
19
|
end
|
20
20
|
|
21
21
|
Then /^the junit output file contains a failing test$/ do
|
22
22
|
step 'I parse the junit results file'
|
23
|
-
@results.at_xpath("/testsuites/testsuite/testcase/failure").
|
24
|
-
@results.at_xpath("/testsuites/testsuite/testcase/failure/@message").value.
|
25
|
-
@results.at_xpath("/testsuites/testsuite/testcase/failure/@type").value.
|
26
|
-
@results.at_xpath("/testsuites/testsuite/testcase/failure").text.
|
23
|
+
expect(@results.at_xpath("/testsuites/testsuite/testcase/failure")).to_not be_nil
|
24
|
+
expect(@results.at_xpath("/testsuites/testsuite/testcase/failure/@message").value).to eq "failed suite one should be failing"
|
25
|
+
expect(@results.at_xpath("/testsuites/testsuite/testcase/failure/@type").value).to eq "failed"
|
26
|
+
expect(@results.at_xpath("/testsuites/testsuite/testcase/failure").text).to match /expected.*2.*got.*1.*using.*==.*spec\/failing_test_spec\.rb:3/m
|
27
27
|
end
|
28
28
|
|
@@ -1,39 +1,39 @@
|
|
1
1
|
Then /^the junit output contains the testsuite element$/ do
|
2
2
|
step 'I parse the junit results file'
|
3
|
-
@results.xpath("/testsuites").size.
|
3
|
+
expect(@results.xpath("/testsuites").size).to eq 1
|
4
4
|
end
|
5
5
|
|
6
6
|
Then /^the junit output reports one passing test$/ do
|
7
7
|
step 'I parse the junit results file'
|
8
|
-
@results.at_xpath("/testsuites/@errors").value.
|
9
|
-
@results.at_xpath("/testsuites/@failures").value.
|
10
|
-
@results.at_xpath("/testsuites/@skipped").value.
|
11
|
-
@results.at_xpath("/testsuites/@tests").value.
|
8
|
+
expect(@results.at_xpath("/testsuites/@errors").value).to eq "0"
|
9
|
+
expect(@results.at_xpath("/testsuites/@failures").value).to eq "0"
|
10
|
+
expect(@results.at_xpath("/testsuites/@skipped").value).to eq "0"
|
11
|
+
expect(@results.at_xpath("/testsuites/@tests").value).to eq "1"
|
12
12
|
end
|
13
13
|
|
14
14
|
Then /^the junit output reports one failing test$/ do
|
15
15
|
step 'I parse the junit results file'
|
16
|
-
@results.at_xpath("/testsuites/@errors").value.
|
17
|
-
@results.at_xpath("/testsuites/@failures").value.
|
18
|
-
@results.at_xpath("/testsuites/@skipped").value.
|
19
|
-
@results.at_xpath("/testsuites/@tests").value.
|
16
|
+
expect(@results.at_xpath("/testsuites/@errors").value).to eq "0"
|
17
|
+
expect(@results.at_xpath("/testsuites/@failures").value).to eq "1"
|
18
|
+
expect(@results.at_xpath("/testsuites/@skipped").value).to eq "0"
|
19
|
+
expect(@results.at_xpath("/testsuites/@tests").value).to eq "1"
|
20
20
|
end
|
21
21
|
|
22
22
|
Then /^the junit output reports one pending test$/ do
|
23
23
|
step 'I parse the junit results file'
|
24
|
-
@results.at_xpath("/testsuites/@errors").value.
|
25
|
-
@results.at_xpath("/testsuites/@failures").value.
|
26
|
-
@results.at_xpath("/testsuites/@skipped").value.
|
27
|
-
@results.at_xpath("/testsuites/@tests").value.
|
24
|
+
expect(@results.at_xpath("/testsuites/@errors").value).to eq "0"
|
25
|
+
expect(@results.at_xpath("/testsuites/@failures").value).to eq "0"
|
26
|
+
expect(@results.at_xpath("/testsuites/@skipped").value).to eq "1"
|
27
|
+
expect(@results.at_xpath("/testsuites/@tests").value).to eq "1"
|
28
28
|
end
|
29
29
|
|
30
30
|
Then /^the junit output testsuite element contains a duration$/ do
|
31
31
|
step 'I parse the junit results file'
|
32
|
-
@results.at_xpath("/testsuites/@time").value.
|
32
|
+
expect(@results.at_xpath("/testsuites/@time").value).to match /[.0-9]+/
|
33
33
|
end
|
34
34
|
|
35
35
|
Then /^the junit output testsuite element contains a timestamp$/ do
|
36
36
|
step 'I parse the junit results file'
|
37
|
-
@results.at_xpath("/testsuites/@timestamp").value.
|
37
|
+
expect(@results.at_xpath("/testsuites/@timestamp").value).to match /\d{4}-\d{2}-\d{2}T\d+:\d+:\d+\+\d+:\d+/
|
38
38
|
end
|
39
39
|
|
@@ -8,7 +8,7 @@ Feature: Suite Summary
|
|
8
8
|
"""
|
9
9
|
describe "suite element" do
|
10
10
|
it "should be present" do
|
11
|
-
1.
|
11
|
+
expect(1).to eq 1
|
12
12
|
end
|
13
13
|
end
|
14
14
|
"""
|
@@ -20,7 +20,7 @@ Feature: Suite Summary
|
|
20
20
|
"""
|
21
21
|
describe "suite level details for 1 passing test" do
|
22
22
|
it "should pass" do
|
23
|
-
1.
|
23
|
+
expect(1).to eq 1
|
24
24
|
end
|
25
25
|
end
|
26
26
|
"""
|
@@ -32,7 +32,7 @@ Feature: Suite Summary
|
|
32
32
|
"""
|
33
33
|
describe "suite level details for 1 failing test" do
|
34
34
|
it "should fail" do
|
35
|
-
1.
|
35
|
+
expect(1).to eq 2
|
36
36
|
end
|
37
37
|
end
|
38
38
|
"""
|
@@ -45,6 +45,7 @@ Feature: Suite Summary
|
|
45
45
|
describe "suite level details for 1 pending test" do
|
46
46
|
it "should be pending" do
|
47
47
|
pending
|
48
|
+
fail
|
48
49
|
end
|
49
50
|
end
|
50
51
|
"""
|
@@ -56,7 +57,7 @@ Feature: Suite Summary
|
|
56
57
|
"""
|
57
58
|
describe "suite element duration" do
|
58
59
|
it "should contain a duration" do
|
59
|
-
1.
|
60
|
+
expect(1).to eq 1
|
60
61
|
end
|
61
62
|
end
|
62
63
|
"""
|
@@ -68,7 +69,7 @@ Feature: Suite Summary
|
|
68
69
|
"""
|
69
70
|
describe "suite element timestamp" do
|
70
71
|
it "should contain a timestamp" do
|
71
|
-
1.
|
72
|
+
expect(1).to eq 1
|
72
73
|
end
|
73
74
|
end
|
74
75
|
"""
|
data/lib/yarjuf.rb
CHANGED
data/lib/yarjuf/j_unit.rb
CHANGED
@@ -1,80 +1,85 @@
|
|
1
|
-
#An RSpec formatter for generating results in JUnit format
|
2
|
-
class JUnit
|
3
|
-
|
4
|
-
#rspec formatter methods we care about
|
1
|
+
# An RSpec formatter for generating results in JUnit format
|
2
|
+
class JUnit
|
3
|
+
RSpec::Core::Formatters.register self, :example_passed, :example_failed, :example_pending, :dump_summary
|
5
4
|
|
6
5
|
def initialize(output)
|
7
|
-
|
6
|
+
@output = output
|
8
7
|
@test_suite_results = {}
|
9
|
-
@builder
|
8
|
+
@builder = Builder::XmlMarkup.new :indent => 2
|
10
9
|
end
|
11
10
|
|
12
|
-
def example_passed(
|
13
|
-
add_to_test_suite_results
|
11
|
+
def example_passed(example_notification)
|
12
|
+
add_to_test_suite_results example_notification
|
14
13
|
end
|
15
14
|
|
16
|
-
def example_failed(
|
17
|
-
add_to_test_suite_results
|
15
|
+
def example_failed(example_notification)
|
16
|
+
add_to_test_suite_results example_notification
|
18
17
|
end
|
19
18
|
|
20
|
-
def example_pending(
|
21
|
-
add_to_test_suite_results
|
19
|
+
def example_pending(example_notification)
|
20
|
+
add_to_test_suite_results example_notification
|
22
21
|
end
|
23
22
|
|
24
|
-
def dump_summary(
|
25
|
-
build_results
|
26
|
-
output.puts @builder.target!
|
23
|
+
def dump_summary(summary)
|
24
|
+
build_results(summary.duration, summary.examples.size, summary.failed_examples.size, summary.pending_examples.size)
|
25
|
+
@output.puts @builder.target!
|
27
26
|
end
|
28
27
|
|
29
28
|
protected
|
30
29
|
|
31
|
-
def add_to_test_suite_results(
|
32
|
-
suite_name
|
30
|
+
def add_to_test_suite_results(example_notification)
|
31
|
+
suite_name = JUnit.root_group_name_for example_notification
|
33
32
|
@test_suite_results[suite_name] = [] unless @test_suite_results.keys.include? suite_name
|
34
|
-
@test_suite_results[suite_name] << example
|
33
|
+
@test_suite_results[suite_name] << example_notification.example
|
35
34
|
end
|
36
35
|
|
37
36
|
def failure_details_for(example)
|
38
|
-
exception
|
39
|
-
|
37
|
+
exception = example.exception
|
38
|
+
formatted_backtrace = RSpec::Core::BacktraceFormatter.new.format_backtrace exception.backtrace
|
39
|
+
exception.nil? ? '' : "#{exception.message}\n#{formatted_backtrace}"
|
40
40
|
end
|
41
41
|
|
42
|
-
#utility methods
|
42
|
+
# utility methods
|
43
43
|
|
44
44
|
def self.count_in_suite_of_type(suite, test_case_result_type)
|
45
|
-
suite.select {|example| example.metadata[:execution_result]
|
45
|
+
suite.select { |example| example.metadata[:execution_result].status == test_case_result_type }.size
|
46
46
|
end
|
47
47
|
|
48
|
-
def self.root_group_name_for(
|
49
|
-
|
50
|
-
current_example_group = example.metadata[:example_group]
|
51
|
-
until current_example_group.nil? do
|
52
|
-
group_hierarchy.unshift current_example_group
|
53
|
-
current_example_group = current_example_group[:example_group]
|
54
|
-
end
|
55
|
-
group_hierarchy.first[:description]
|
48
|
+
def self.root_group_name_for(example_notification)
|
49
|
+
example_notification.example.metadata[:example_group][:description]
|
56
50
|
end
|
57
51
|
|
58
|
-
#methods to build the xml for test suites and individual tests
|
52
|
+
# methods to build the xml for test suites and individual tests
|
59
53
|
|
60
54
|
def build_results(duration, example_count, failure_count, pending_count)
|
61
55
|
@builder.instruct! :xml, :version => "1.0", :encoding => "UTF-8"
|
62
|
-
@builder.testsuites
|
56
|
+
@builder.testsuites(
|
57
|
+
:errors => 0,
|
58
|
+
:failures => failure_count,
|
59
|
+
:skipped => pending_count,
|
60
|
+
:tests => example_count,
|
61
|
+
:time => duration,
|
62
|
+
:timestamp => Time.now.iso8601) do
|
63
63
|
build_all_suites
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
67
|
def build_all_suites
|
68
68
|
@test_suite_results.each do |suite_name, tests|
|
69
|
-
build_test_suite
|
69
|
+
build_test_suite(suite_name, tests)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
73
|
def build_test_suite(suite_name, tests)
|
74
|
-
failure_count = JUnit.count_in_suite_of_type
|
75
|
-
skipped_count = JUnit.count_in_suite_of_type
|
76
|
-
|
77
|
-
@builder.testsuite
|
74
|
+
failure_count = JUnit.count_in_suite_of_type(tests, :failed)
|
75
|
+
skipped_count = JUnit.count_in_suite_of_type(tests, :pending)
|
76
|
+
|
77
|
+
@builder.testsuite(
|
78
|
+
:name => suite_name,
|
79
|
+
:tests => tests.size,
|
80
|
+
:errors => 0,
|
81
|
+
:failures => failure_count,
|
82
|
+
:skipped => skipped_count) do
|
78
83
|
@builder.properties
|
79
84
|
build_all_tests tests
|
80
85
|
end
|
@@ -87,14 +92,16 @@ class JUnit < RSpec::Core::Formatters::BaseFormatter
|
|
87
92
|
end
|
88
93
|
|
89
94
|
def build_test(test)
|
90
|
-
test_name
|
91
|
-
execution_time = test.metadata[:execution_result]
|
92
|
-
test_status
|
95
|
+
test_name = test.metadata[:full_description]
|
96
|
+
execution_time = test.metadata[:execution_result].run_time
|
97
|
+
test_status = test.metadata[:execution_result].status
|
93
98
|
|
94
|
-
@builder.testcase
|
99
|
+
@builder.testcase(:name => test_name, :time => execution_time) do
|
95
100
|
case test_status
|
96
|
-
|
97
|
-
|
101
|
+
when :pending
|
102
|
+
@builder.skipped
|
103
|
+
when :failed
|
104
|
+
build_failed_test test
|
98
105
|
end
|
99
106
|
end
|
100
107
|
end
|
@@ -102,9 +109,9 @@ class JUnit < RSpec::Core::Formatters::BaseFormatter
|
|
102
109
|
def build_failed_test(test)
|
103
110
|
failure_message = "failed #{test.metadata[:full_description]}"
|
104
111
|
|
105
|
-
@builder.failure
|
106
|
-
@builder.cdata!
|
112
|
+
@builder.failure(:message => failure_message, :type => 'failed') do
|
113
|
+
@builder.cdata!(failure_details_for(test))
|
107
114
|
end
|
108
115
|
end
|
109
|
-
end
|
110
116
|
|
117
|
+
end
|
data/lib/yarjuf/version.rb
CHANGED
data/yarjuf.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.name = 'yarjuf'
|
8
8
|
gem.version = Yarjuf::VERSION
|
9
9
|
gem.platform = Gem::Platform::RUBY
|
10
|
-
gem.authors = ['Nat Ritmeyer']
|
10
|
+
gem.authors = ['Nat Ritmeyer', 'Ben Snape']
|
11
11
|
gem.email = ['nat@natontesting.com']
|
12
12
|
gem.homepage = 'http://github.com/natritmeyer/yarjuf'
|
13
13
|
gem.summary = 'Yet Another RSpec JUnit Formatter (for Hudson/Jenkins)'
|
@@ -18,14 +18,14 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
19
|
gem.require_paths = ['lib']
|
20
20
|
|
21
|
-
gem.add_runtime_dependency('rspec', '~>
|
21
|
+
gem.add_runtime_dependency('rspec', '~> 3')
|
22
22
|
gem.add_runtime_dependency('builder')
|
23
23
|
|
24
24
|
gem.add_development_dependency('nokogiri', '~> 1.5.10') # for Ruby 1.8.7
|
25
|
-
gem.add_development_dependency('rake')
|
26
|
-
gem.add_development_dependency('cucumber')
|
27
|
-
gem.add_development_dependency('aruba')
|
28
|
-
gem.add_development_dependency('simplecov')
|
25
|
+
gem.add_development_dependency('rake', '~> 10.3.2')
|
26
|
+
gem.add_development_dependency('cucumber', '~> 1.3.16')
|
27
|
+
gem.add_development_dependency('aruba', '~> 0.6.0')
|
28
|
+
gem.add_development_dependency('simplecov', '~> 0.8.2') # for Ruby 1.8.7
|
29
29
|
gem.add_development_dependency('reek', ['= 1.3.7']) # for Ruby 1.8.7
|
30
30
|
gem.add_development_dependency('rainbow', '~> 1.99.2') # for Ruby 1.8.7
|
31
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yarjuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nat Ritmeyer
|
8
|
+
- Ben Snape
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rspec
|
@@ -16,14 +17,14 @@ dependencies:
|
|
16
17
|
requirements:
|
17
18
|
- - "~>"
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
+
version: '3'
|
20
21
|
type: :runtime
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
25
|
- - "~>"
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
+
version: '3'
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: builder
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,58 +57,58 @@ dependencies:
|
|
56
57
|
name: rake
|
57
58
|
requirement: !ruby/object:Gem::Requirement
|
58
59
|
requirements:
|
59
|
-
- - "
|
60
|
+
- - "~>"
|
60
61
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
+
version: 10.3.2
|
62
63
|
type: :development
|
63
64
|
prerelease: false
|
64
65
|
version_requirements: !ruby/object:Gem::Requirement
|
65
66
|
requirements:
|
66
|
-
- - "
|
67
|
+
- - "~>"
|
67
68
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
+
version: 10.3.2
|
69
70
|
- !ruby/object:Gem::Dependency
|
70
71
|
name: cucumber
|
71
72
|
requirement: !ruby/object:Gem::Requirement
|
72
73
|
requirements:
|
73
|
-
- - "
|
74
|
+
- - "~>"
|
74
75
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
76
|
+
version: 1.3.16
|
76
77
|
type: :development
|
77
78
|
prerelease: false
|
78
79
|
version_requirements: !ruby/object:Gem::Requirement
|
79
80
|
requirements:
|
80
|
-
- - "
|
81
|
+
- - "~>"
|
81
82
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
83
|
+
version: 1.3.16
|
83
84
|
- !ruby/object:Gem::Dependency
|
84
85
|
name: aruba
|
85
86
|
requirement: !ruby/object:Gem::Requirement
|
86
87
|
requirements:
|
87
|
-
- - "
|
88
|
+
- - "~>"
|
88
89
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
90
|
+
version: 0.6.0
|
90
91
|
type: :development
|
91
92
|
prerelease: false
|
92
93
|
version_requirements: !ruby/object:Gem::Requirement
|
93
94
|
requirements:
|
94
|
-
- - "
|
95
|
+
- - "~>"
|
95
96
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
97
|
+
version: 0.6.0
|
97
98
|
- !ruby/object:Gem::Dependency
|
98
99
|
name: simplecov
|
99
100
|
requirement: !ruby/object:Gem::Requirement
|
100
101
|
requirements:
|
101
|
-
- - "
|
102
|
+
- - "~>"
|
102
103
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
104
|
+
version: 0.8.2
|
104
105
|
type: :development
|
105
106
|
prerelease: false
|
106
107
|
version_requirements: !ruby/object:Gem::Requirement
|
107
108
|
requirements:
|
108
|
-
- - "
|
109
|
+
- - "~>"
|
109
110
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
111
|
+
version: 0.8.2
|
111
112
|
- !ruby/object:Gem::Dependency
|
112
113
|
name: reek
|
113
114
|
requirement: !ruby/object:Gem::Requirement
|