ci_reporter_spinach 0.0.1 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f2e86d5d8c12780724e6fbd018fc29f76bf9dd4
4
- data.tar.gz: fb084b6533486d9bb45e1a6d653c795ff6b36010
3
+ metadata.gz: 0efd2e34f66844a597480af7b2012929aa9bab13
4
+ data.tar.gz: 3278b3929f988627f012257c5b9dbd1c5e3bc442
5
5
  SHA512:
6
- metadata.gz: 15f1a4898eafaf09e3ad29d06459ac260f72757017f54392a4a5325397b775cfe4ec4461c96af9857d79dcefe44552280103885ee7580b01de07179f2e9421e3
7
- data.tar.gz: f859d2dfcee09b71ec12293d0c2388703e304f1905f917fddbaba2361fc0e893071fbdb729904f39d4a77d2e8c35e737be369cee0af72bcc157488a87ade8aee
6
+ metadata.gz: d40144a0eb03d9a7ed182f059d71316eefb6cdfde50028d56d354c7ec6e1c7f56d25e365646db39e27dc988b938e075e4df77f60961ec96a53f5fa33c34e9940
7
+ data.tar.gz: c34e00ea382304f351730c01dc455eda81b787c888ba369bd054a45d150f1de20987e16963dc1c7783cbc203285ac65a49de8c64f59b85e68618b6e99461bfb9
@@ -0,0 +1,4 @@
1
+ ## 1.0.0 (2014-07-24)
2
+
3
+ The first release after being separated from `ci_reporter`. No notable
4
+ changes since ci_reporter version 1.9.2.
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 RSpec task.
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,6 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
- require 'ci/reporter/internal'
3
- include CI::Reporter::Internal
2
+ require 'ci/reporter/test_utils/rake'
3
+ include CI::Reporter::TestUtils::Rake
4
4
 
5
5
  namespace :generate do
6
6
  task :clean do
@@ -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
- it "should generate one XML file" do
7
- File.exist?(File.join(REPORTS_DIR, 'FEATURES-Example-Spinach-feature.xml')).should == true
9
+ include CI::Reporter::TestUtils::SharedExamples
10
+ Accessor = CI::Reporter::TestUtils::Accessor
8
11
 
9
- Dir["#{REPORTS_DIR}/FEATURES-*Spinach*.xml"].length.should == 1
10
- end
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
- context "SPINACH report file" do
13
- before :each do
14
- @doc = File.open(File.join(REPORTS_DIR, 'FEATURES-Example-Spinach-feature.xml')) do |f|
15
- REXML::Document.new(f)
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
- it "should have three tests and two failures" do
20
- @doc.root.attributes["errors"].should == "2"
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
- it "should have one failure for the lazy hacker" do
27
- failures = @doc.root.elements.to_a("/testsuite/testcase[@name='Lazy hacker']/failure")
28
- failures.size.should == 1
29
- failures.first.attributes["type"].should =~ /ExpectationNotMetError/
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
- it "should have one failure for missing steps" do
33
- failures = @doc.root.elements.to_a("/testsuite/testcase[@name='Missing steps']/failure")
34
- failures.size.should == 1
35
- failures.first.attributes["type"].should =~ /StepNotDefinedException/
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
- it "should have one failure for the bad coder" do
39
- failures = @doc.root.elements.to_a("/testsuite/testcase[@name='Bad coder']/failure")
40
- failures.size.should == 1
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
@@ -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.0.alpha1"
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", "~> 2.0"
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
@@ -1,7 +1,7 @@
1
1
  module CI
2
2
  module Reporter
3
3
  module SpinachVersion
4
- VERSION = "0.0.1"
4
+ VERSION = "1.0.0"
5
5
  end
6
6
  end
7
7
  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.1
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-06-13 00:00:00.000000000 Z
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.0.alpha1
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.0.alpha1
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: '2.0'
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: '2.0'
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