ci_reporter_spinach 0.0.1 → 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/CHANGELOG.md +4 -0
- data/README.md +6 -1
- data/Rakefile +2 -2
- data/acceptance/verification_spec.rb +55 -26
- data/ci_reporter_spinach.gemspec +4 -2
- data/lib/ci/reporter/spinach/version.rb +1 -1
- metadata +37 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0efd2e34f66844a597480af7b2012929aa9bab13
|
4
|
+
data.tar.gz: 3278b3929f988627f012257c5b9dbd1c5e3bc442
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d40144a0eb03d9a7ed182f059d71316eefb6cdfde50028d56d354c7ec6e1c7f56d25e365646db39e27dc988b938e075e4df77f60961ec96a53f5fa33c34e9940
|
7
|
+
data.tar.gz: c34e00ea382304f351730c01dc455eda81b787c888ba369bd054a45d150f1de20987e16963dc1c7783cbc203285ac65a49de8c64f59b85e68618b6e99461bfb9
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
Connects [Spinach][spin] to [CI::Reporter][ci], and then to your CI
|
4
4
|
system.
|
5
5
|
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/ci_reporter_spinach.svg)](http://badge.fury.io/rb/ci_reporter_spinach)
|
7
|
+
[![Build Status](https://travis-ci.org/ci-reporter/ci_reporter_spinach.svg?branch=master)](https://travis-ci.org/ci-reporter/ci_reporter_spinach)
|
8
|
+
[![Dependency Status](https://gemnasium.com/ci-reporter/ci_reporter_spinach.svg)](https://gemnasium.com/ci-reporter/ci_reporter_spinach)
|
9
|
+
[![Code Climate](https://codeclimate.com/github/ci-reporter/ci_reporter_spinach.png)](https://codeclimate.com/github/ci-reporter/ci_reporter_spinach)
|
10
|
+
|
6
11
|
[spin]: https://github.com/codegram/spinach
|
7
12
|
[ci]: https://github.com/ci-reporter/ci_reporter
|
8
13
|
|
@@ -27,7 +32,7 @@ $ bundle
|
|
27
32
|
## Usage
|
28
33
|
|
29
34
|
Require the reporter in your Rakefile, and ensure that
|
30
|
-
`ci:setup:spinach` is a dependency of your
|
35
|
+
`ci:setup:spinach` is a dependency of your Spinach task.
|
31
36
|
|
32
37
|
Unlike other CI::Reporter gems, you must **also** explictly tell
|
33
38
|
Spinach to use the reporter!
|
data/Rakefile
CHANGED
@@ -1,44 +1,73 @@
|
|
1
1
|
require 'rexml/document'
|
2
|
+
require 'ci/reporter/test_utils/accessor'
|
3
|
+
require 'ci/reporter/test_utils/shared_examples'
|
4
|
+
require 'rspec/collection_matchers'
|
2
5
|
|
3
6
|
REPORTS_DIR = File.dirname(__FILE__) + '/reports'
|
4
7
|
|
5
8
|
describe "Spinach acceptance" do
|
6
|
-
|
7
|
-
|
9
|
+
include CI::Reporter::TestUtils::SharedExamples
|
10
|
+
Accessor = CI::Reporter::TestUtils::Accessor
|
8
11
|
|
9
|
-
|
10
|
-
|
12
|
+
let(:report_path) { File.join(REPORTS_DIR, 'FEATURES-Example-Spinach-feature.xml') }
|
13
|
+
|
14
|
+
context "the feature" do
|
15
|
+
subject(:result) { Accessor.new(load_xml_result(report_path)) }
|
16
|
+
|
17
|
+
it { is_expected.to have(2).errors }
|
18
|
+
it { is_expected.to have(1).failures }
|
19
|
+
it { is_expected.to have(4).testcases }
|
20
|
+
|
21
|
+
it_behaves_like "a report with consistent attribute counts"
|
22
|
+
it_behaves_like "assertions are not tracked"
|
23
|
+
it_behaves_like "nothing was output"
|
11
24
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
25
|
+
describe "the test the lazy hacker wrote" do
|
26
|
+
subject(:testcase) { result.testcase('Lazy hacker') }
|
27
|
+
|
28
|
+
it { is_expected.to have(1).failures }
|
29
|
+
|
30
|
+
describe "the failure" do
|
31
|
+
subject(:failure) { testcase.failures.first }
|
32
|
+
|
33
|
+
it "has a type" do
|
34
|
+
expect(failure.type).to match /ExpectationNotMetError/
|
35
|
+
end
|
16
36
|
end
|
17
37
|
end
|
18
38
|
|
19
|
-
|
20
|
-
|
21
|
-
@doc.root.attributes["failures"].should == "1"
|
22
|
-
@doc.root.attributes["tests"].should == "4"
|
23
|
-
@doc.root.elements.to_a("/testsuite/testcase").size.should == 4
|
24
|
-
end
|
39
|
+
describe "the test with missing steps" do
|
40
|
+
subject(:testcase) { result.testcase('Missing steps') }
|
25
41
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
42
|
+
it { is_expected.to have(1).errors }
|
43
|
+
|
44
|
+
describe "the failure" do
|
45
|
+
subject(:failure) { testcase.errors.first }
|
46
|
+
|
47
|
+
it "has a type" do
|
48
|
+
expect(failure.type).to match /StepNotDefinedException/
|
49
|
+
end
|
50
|
+
end
|
30
51
|
end
|
31
52
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
53
|
+
describe "the test the bad coder wrote" do
|
54
|
+
subject(:testcase) { result.testcase('Bad coder') }
|
55
|
+
|
56
|
+
it { is_expected.to have(1).errors }
|
57
|
+
|
58
|
+
describe "the failure" do
|
59
|
+
subject(:failure) { testcase.errors.first }
|
60
|
+
|
61
|
+
it "has a type" do
|
62
|
+
expect(failure.type).to match /RuntimeError/
|
63
|
+
end
|
64
|
+
end
|
36
65
|
end
|
66
|
+
end
|
37
67
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
failures.first.attributes["type"].should == "RuntimeError"
|
68
|
+
def load_xml_result(path)
|
69
|
+
File.open(path) do |f|
|
70
|
+
REXML::Document.new(f)
|
42
71
|
end
|
43
72
|
end
|
44
73
|
end
|
data/ci_reporter_spinach.gemspec
CHANGED
@@ -17,10 +17,12 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features|acceptance)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "ci_reporter", "2.0
|
20
|
+
spec.add_dependency "ci_reporter", "~> 2.0"
|
21
21
|
spec.add_dependency "spinach", "~> 0.8.7"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
24
|
spec.add_development_dependency "rake"
|
25
|
-
spec.add_development_dependency "rspec", "~>
|
25
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
26
|
+
spec.add_development_dependency "rspec-collection_matchers"
|
27
|
+
spec.add_development_dependency "ci_reporter_test_utils"
|
26
28
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci_reporter_spinach
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sieger
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ci_reporter
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 2.0
|
20
|
+
version: '2.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 2.0
|
27
|
+
version: '2.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: spinach
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,14 +73,42 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '3.0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '3.0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: rspec-collection_matchers
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: ci_reporter_test_utils
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
84
112
|
description:
|
85
113
|
email:
|
86
114
|
- nick@nicksieger.com
|
@@ -91,6 +119,7 @@ extra_rdoc_files: []
|
|
91
119
|
files:
|
92
120
|
- ".gitignore"
|
93
121
|
- ".travis.yml"
|
122
|
+
- CHANGELOG.md
|
94
123
|
- Gemfile
|
95
124
|
- LICENSE.txt
|
96
125
|
- README.md
|