ci_reporter_cucumber 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: e93cb95d49957071f7d5ea80422c2d7ce69af3fd
4
- data.tar.gz: 92c854967c6358888c65c84b2314da3d0fb0bb8c
3
+ metadata.gz: 2133eea031b3f3aee3148156e608fba3903cd082
4
+ data.tar.gz: e570cb793e801c353899467de73bdc863f18edf5
5
5
  SHA512:
6
- metadata.gz: 3eb5f4f053066b8badb22b9a36fa912c553309ccb77c3f8e3af6df07658d25b1e9505a482f12531c2ddb32280247dcb4bc3f2708af16b7c8b716afbece8798a9
7
- data.tar.gz: 5f285aed76ea481f074167a65bf2267807ef1653b608edf6d2617470414070553a6ed93bff818322ad21a5ec62d1ac34d74301ac94a6c4e438f65ed0ff09905c
6
+ metadata.gz: bb32682ca29ad5e90df02031976cc07e1601c573064cfbe89b4b875fda95fa897defb2fd63686d568d415ee25f26bdee2b61fba89a7e058bdd1785451ab2b217
7
+ data.tar.gz: b00b80c1ae4740bca845c3d449d3c946cd8d7a94b9737b152b89803974f81a3b71194ea9e21aa47b38639de070f5e5613f10eb15916cf47065a2dcabb359e888
data/README.md CHANGED
@@ -3,6 +3,11 @@
3
3
  Connects [Cucumber][cuke] to [CI::Reporter][ci], and then to your CI
4
4
  system.
5
5
 
6
+ [![Gem Version](https://badge.fury.io/rb/ci_reporter_cucumber.svg)](http://badge.fury.io/rb/ci_reporter_cucumber)
7
+ [![Build Status](https://travis-ci.org/ci-reporter/ci_reporter_cucumber.svg?branch=master)](https://travis-ci.org/ci-reporter/ci_reporter_cucumber)
8
+ [![Dependency Status](https://gemnasium.com/ci-reporter/ci_reporter_cucumber.svg)](https://gemnasium.com/ci-reporter/ci_reporter_cucumber)
9
+ [![Code Climate](https://codeclimate.com/github/ci-reporter/ci_reporter_cucumber.png)](https://codeclimate.com/github/ci-reporter/ci_reporter_cucumber)
10
+
6
11
  [cuke]: http://cukes.info/
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:cucumber` is a dependency of your RSpec task:
35
+ `ci:setup:cucumber` is a dependency of your Cucumber task:
31
36
 
32
37
  ```ruby
33
38
  require 'ci/reporter/rake/cucumber'
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
@@ -17,7 +17,7 @@ Given /^that I am a lazy hacker$/ do
17
17
  end
18
18
 
19
19
  Given /^I don't bother writing cucumber features$/ do
20
- false.should be true
20
+ expect(false).to eql true
21
21
  end
22
22
 
23
23
  Then /^I should be fired$/ do
@@ -1,38 +1,59 @@
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 "Cucumber acceptance" do
6
- it "should generate one XML file" do
7
- File.exist?(File.join(REPORTS_DIR, 'FEATURES-Example-Cucumber-feature.xml')).should == true
9
+ include CI::Reporter::TestUtils::SharedExamples
10
+ Accessor = CI::Reporter::TestUtils::Accessor
8
11
 
9
- Dir["#{REPORTS_DIR}/FEATURES-*Cucumber*.xml"].length.should == 1
10
- end
12
+ let(:report_path) { File.join(REPORTS_DIR, 'FEATURES-Example-Cucumber-feature.xml') }
13
+
14
+ describe "the feature" do
15
+ subject(:result) { Accessor.new(load_xml_result(report_path)) }
16
+
17
+ it { is_expected.to have(0).errors }
18
+ it { is_expected.to have(2).failures }
19
+ it { is_expected.to have(3).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"
24
+
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 }
11
29
 
12
- context "FEATURES report file" do
13
- before :each do
14
- @doc = File.open(File.join(REPORTS_DIR, 'FEATURES-Example-Cucumber-feature.xml')) do |f|
15
- REXML::Document.new(f)
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 == "0"
21
- @doc.root.attributes["failures"].should == "2"
22
- @doc.root.attributes["tests"].should == "3"
23
- @doc.root.elements.to_a("/testsuite/testcase").size.should == 3
24
- end
39
+ describe "the test the bad coder wrote" do
40
+ subject(:testcase) { result.testcase('Bad coder') }
41
+
42
+ it { is_expected.to have(1).failures }
25
43
 
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/
44
+ describe "the failure" do
45
+ subject(:failure) { testcase.failures.first }
46
+
47
+ it "has a type" do
48
+ expect(failure.type).to match /RuntimeError/
49
+ end
50
+ end
30
51
  end
52
+ end
31
53
 
32
- it "should have one failure for the bad coder" do
33
- failures = @doc.root.elements.to_a("/testsuite/testcase[@name='Bad coder']/failure")
34
- failures.size.should == 1
35
- failures.first.attributes["type"].should == "RuntimeError"
54
+ def load_xml_result(path)
55
+ File.open(path) do |f|
56
+ REXML::Document.new(f)
36
57
  end
37
58
  end
38
59
  end
@@ -18,9 +18,11 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "cucumber", "~> 1.3.3"
21
- spec.add_dependency "ci_reporter", "2.0.0.alpha1"
21
+ spec.add_dependency "ci_reporter", "2.0.0.alpha2"
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
  class Cucumber
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,37 @@
1
+ require File.dirname(__FILE__) + "/../../spec_helper.rb"
2
+ require 'ci/reporter/cucumber'
3
+
4
+ module CI::Reporter
5
+ describe CucumberFailure do
6
+ let(:klass) { double("class", name: "Exception name") }
7
+ let(:exception) do
8
+ double("exception",
9
+ class: klass,
10
+ message: "Exception message",
11
+ backtrace: ["First line", "Second line"])
12
+ end
13
+ let(:step) { double("step", exception: exception) }
14
+
15
+ subject(:cucumber_failure) { CucumberFailure.new(step) }
16
+
17
+ it "is always a failure" do
18
+ expect(cucumber_failure).to be_failure
19
+ end
20
+
21
+ it "is never an error" do
22
+ expect(cucumber_failure).to_not be_error
23
+ end
24
+
25
+ it "uses the exception's class name as the name" do
26
+ expect(cucumber_failure.name).to eql "Exception name"
27
+ end
28
+
29
+ it "uses the exception's message as the message" do
30
+ expect(cucumber_failure.message).to eql "Exception message"
31
+ end
32
+
33
+ it "formats the exception's backtrace" do
34
+ expect(cucumber_failure.location).to eql "First line\nSecond line"
35
+ end
36
+ end
37
+ end
@@ -1,224 +1,166 @@
1
1
  require File.dirname(__FILE__) + "/../../spec_helper.rb"
2
2
  require 'ci/reporter/cucumber'
3
3
 
4
- describe "The Cucumber reporter" do
5
- describe CI::Reporter::CucumberFailure do
6
- before(:each) do
7
- @klass = double("class")
8
- @klass.stub(:name).and_return("Exception name")
9
-
10
- @exception = double("exception")
11
- @exception.stub(:class).and_return(@klass)
12
- @exception.stub(:message).and_return("Exception message")
13
- @exception.stub(:backtrace).and_return(["First line", "Second line"])
14
-
15
- @step = double("step")
16
- @step.stub(:exception).and_return(@exception)
17
-
18
- @cucumber_failure = CI::Reporter::CucumberFailure.new(@step)
19
- end
20
-
21
- it "should always return true for failure?" do
22
- @cucumber_failure.should be_failure
23
- end
24
-
25
- it "should always return false for error?" do
26
- @cucumber_failure.should_not be_error
27
- end
28
-
29
- it "should propagate the name as the underlying exception's class name" do
30
- @step.should_receive(:exception)
31
- @exception.should_receive(:class)
32
- @klass.should_receive(:name)
33
-
34
- @cucumber_failure.name.should == "Exception name"
35
- end
36
-
37
- it "should propagate the message as the underlying exception's message" do
38
- @step.should_receive(:exception)
39
- @exception.should_receive(:message)
40
-
41
- @cucumber_failure.message.should == "Exception message"
42
- end
43
-
44
- it "should propagate and format the exception's backtrace" do
45
- @step.should_receive(:exception)
46
- @exception.should_receive(:backtrace)
47
-
48
- @cucumber_failure.location.should == "First line\nSecond line"
49
- end
50
- end
51
-
52
- describe CI::Reporter::Cucumber do
53
- before(:each) do
54
- @step_mother = double("step_mother")
55
- @io = double("io")
56
-
57
- @report_manager = double("report_manager")
58
- CI::Reporter::ReportManager.stub(:new).and_return(@report_manager)
4
+ module CI::Reporter
5
+ describe Cucumber do
6
+ let(:step_mother) { double("step_mother") }
7
+ let(:io) { double("io") }
8
+ let(:report_manager) { double("report_manager") }
9
+
10
+ before :each do
11
+ allow(CI::Reporter::ReportManager).to receive(:new).and_return(report_manager)
59
12
  end
60
13
 
61
14
  def new_instance
62
- CI::Reporter::Cucumber.new(@step_mother, @io, {})
15
+ CI::Reporter::Cucumber.new(step_mother, io, {})
63
16
  end
64
17
 
65
- it "should create a new report manager to report on test success/failure" do
66
- CI::Reporter::ReportManager.should_receive(:new)
18
+ it "creates a new report manager" do
19
+ expect(CI::Reporter::ReportManager).to receive(:new)
67
20
  new_instance
68
21
  end
69
22
 
70
- it "should record the feature name when a new feature is visited" do
23
+ it "records the feature name of a new feature" do
71
24
  cucumber = new_instance
72
25
  cucumber.feature_name(nil, "Some feature name")
73
- cucumber.name.should == "Some feature name"
26
+ expect(cucumber.name).to eql "Some feature name"
74
27
  end
75
28
 
76
- it "should record only the first line of a feature name" do
29
+ it "records only the first line of a feature name" do
77
30
  cucumber = new_instance
78
31
  cucumber.feature_name(nil, "Some feature name\nLonger description")
79
- cucumber.name.should == "Some feature name"
32
+ expect(cucumber.name).to eql "Some feature name"
80
33
  end
81
34
 
82
35
  context "applied to a feature" do
83
- before(:each) do
84
- @cucumber = new_instance
85
- @cucumber.feature_name(nil, "Demo feature")
86
-
87
- @test_suite = double("test_suite", :start => nil, :finish => nil, :name= => nil)
88
- CI::Reporter::TestSuite.stub(:new).and_return(@test_suite)
89
-
90
- @feature = double("feature")
91
-
92
- @report_manager.stub(:write_report)
36
+ let(:cucumber) { new_instance }
37
+ let(:test_suite) { double("test_suite", start: nil, finish: nil, :name= => nil) }
38
+ let(:feature) { double("feature") }
39
+
40
+ before :each do
41
+ cucumber.feature_name(nil, "Demo feature")
42
+ allow(CI::Reporter::TestSuite).to receive(:new).and_return(test_suite)
43
+ allow(report_manager).to receive(:write_report)
93
44
  end
94
45
 
95
46
  context "before" do
96
- it "should create a new test suite" do
97
- CI::Reporter::TestSuite.should_receive(:new).with(/Demo feature/)
98
- @cucumber.before_feature(@feature)
47
+ it "creates a new test suite" do
48
+ expect(CI::Reporter::TestSuite).to receive(:new).with(/Demo feature/)
49
+ cucumber.before_feature(feature)
99
50
  end
100
51
 
101
- it "should indicate that the test suite has started" do
102
- @test_suite.should_receive(:start)
103
- @cucumber.before_feature(@feature)
52
+ it "indicates that the test suite has started" do
53
+ expect(test_suite).to receive(:start)
54
+ cucumber.before_feature(feature)
104
55
  end
105
56
  end
106
57
 
107
58
  context "after" do
108
- before :each do
109
- @cucumber = new_instance
110
- @cucumber.feature_name(nil, "Demo feature")
111
-
112
- @test_suite = double("test_suite", :start => nil, :finish => nil, :name= => nil)
113
- CI::Reporter::TestSuite.stub(:new).and_return(@test_suite)
114
-
115
- @feature = double("feature")
116
-
117
- @report_manager.stub(:write_report)
59
+ let(:cucumber) { new_instance }
60
+ let(:test_suite) { double("test_suite", start: nil, finish: nil, :name= => nil) }
61
+ let(:feature) { double("feature") }
118
62
 
119
- @cucumber.before_feature(@feature)
63
+ before :each do
64
+ cucumber.feature_name(nil, "Demo feature")
65
+ allow(CI::Reporter::TestSuite).to receive(:new).and_return(test_suite)
66
+ allow(report_manager).to receive(:write_report)
67
+ cucumber.before_feature(feature)
120
68
  end
121
69
 
122
- it "should indicate that the test suite has finished" do
123
- @test_suite.should_receive(:finish)
124
- @cucumber.after_feature(@feature)
70
+ it "indicates that the test suite has finished" do
71
+ expect(test_suite).to receive(:finish)
72
+ cucumber.after_feature(feature)
125
73
  end
126
74
 
127
- it "should ask the report manager to write a report" do
128
- @report_manager.should_receive(:write_report).with(@test_suite)
129
- @cucumber.after_feature(@feature)
75
+ it "asks the report manager to write a report" do
76
+ expect(report_manager).to receive(:write_report).with(test_suite)
77
+ cucumber.after_feature(feature)
130
78
  end
131
79
  end
132
80
  end
133
81
 
134
82
  context "inside a scenario" do
135
- before(:each) do
136
- @testcases = []
137
-
138
- @test_suite = double("test_suite", :testcases => @testcases)
139
-
140
- @cucumber = new_instance
141
- @cucumber.stub(:test_suite).and_return(@test_suite)
142
-
143
- @test_case = double("test_case", :start => nil, :finish => nil, :name => "Step Name")
144
- CI::Reporter::TestCase.stub(:new).and_return(@test_case)
145
-
146
- @step = double("step", :status => :passed)
147
- @step.stub(:name).and_return("Step Name")
83
+ let(:testcases) { [] }
84
+ let(:test_suite) { double("test_suite", testcases: testcases) }
85
+ let(:cucumber) { new_instance }
86
+ let(:test_case) { double("test_case", start: nil, finish: nil, name: "Step Name") }
87
+ let(:step) { double("step", :status => :passed, name: "Step Name") }
88
+
89
+ before :each do
90
+ allow(cucumber).to receive(:test_suite).and_return(test_suite)
91
+ allow(CI::Reporter::TestCase).to receive(:new).and_return(test_case)
148
92
  end
149
93
 
150
94
  context "before steps" do
151
- it "should create a new test case" do
152
- CI::Reporter::TestCase.should_receive(:new).with("Step Name")
153
- @cucumber.scenario_name(nil, "Step Name")
154
- @cucumber.before_steps(@step)
95
+ it "creates a new test case" do
96
+ expect(CI::Reporter::TestCase).to receive(:new).with("Step Name")
97
+ cucumber.scenario_name(nil, "Step Name")
98
+ cucumber.before_steps(step)
155
99
  end
156
100
 
157
- it "should indicate that the test case has started" do
158
- @test_case.should_receive(:start)
159
- @cucumber.before_steps(@step)
101
+ it "indicates that the test case has started" do
102
+ expect(test_case).to receive(:start)
103
+ cucumber.before_steps(step)
160
104
  end
161
105
  end
162
106
 
163
107
  context "after steps" do
164
108
  before :each do
165
- @cucumber.before_steps(@step)
109
+ cucumber.before_steps(step)
166
110
  end
167
111
 
168
- it "should indicate that the test case has finished" do
169
- @test_case.should_receive(:finish)
170
- @cucumber.after_steps(@step)
112
+ it "indicates that the test case has finished" do
113
+ expect(test_case).to receive(:finish)
114
+ cucumber.after_steps(step)
171
115
  end
172
116
 
173
- it "should add the test case to the suite's list of cases" do
174
- @testcases.should be_empty
175
- @cucumber.after_steps(@step)
176
- @testcases.should_not be_empty
177
- @testcases.first.should == @test_case
117
+ it "adds the test case to the suite's list of cases" do
118
+ expect(testcases).to be_empty
119
+ cucumber.after_steps(step)
120
+ expect(testcases).to_not be_empty
121
+ expect(testcases.first).to eql test_case
178
122
  end
179
123
 
180
- it "should alter the name of a test case that is pending to include '(PENDING)'" do
181
- @step.stub(:status).and_return(:pending)
182
- @test_case.should_receive(:name=).with("Step Name (PENDING)")
183
- @cucumber.after_steps(@step)
124
+ it "alters the name of a test case that is pending to include '(PENDING)'" do
125
+ allow(step).to receive(:status).and_return(:pending)
126
+ expect(test_case).to receive(:name=).with("Step Name (PENDING)")
127
+ cucumber.after_steps(step)
184
128
  end
185
129
 
186
- it "should alter the name of a test case that is undefined to include '(PENDING)'" do
187
- @step.stub(:status).and_return(:undefined)
188
- @test_case.should_receive(:name=).with("Step Name (PENDING)")
189
- @cucumber.after_steps(@step)
130
+ it "alters the name of a test case that is undefined to include '(PENDING)'" do
131
+ allow(step).to receive(:status).and_return(:undefined)
132
+ expect(test_case).to receive(:name=).with("Step Name (PENDING)")
133
+ cucumber.after_steps(step)
190
134
  end
191
135
 
192
- it "should alter the name of a test case that was skipped to include '(SKIPPED)'" do
193
- @step.stub(:status).and_return(:skipped)
194
- @test_case.should_receive(:name=).with("Step Name (SKIPPED)")
195
- @cucumber.after_steps(@step)
136
+ it "alter the name of a test case that was skipped to include '(SKIPPED)'" do
137
+ allow(step).to receive(:status).and_return(:skipped)
138
+ expect(test_case).to receive(:name=).with("Step Name (SKIPPED)")
139
+ cucumber.after_steps(step)
196
140
  end
197
141
  end
198
142
 
199
143
  describe "that fails" do
200
- before(:each) do
201
- @step.stub(:status).and_return(:failed)
202
-
203
- @failures = []
204
- @test_case.stub(:failures).and_return(@failures)
144
+ let(:failures) { [] }
145
+ let(:cucumber_failure) { double("cucumber_failure") }
205
146
 
206
- @cucumber.before_steps(@step)
207
-
208
- @cucumber_failure = double("cucumber_failure")
209
- CI::Reporter::CucumberFailure.stub(:new).and_return(@cucumber_failure)
147
+ before :each do
148
+ allow(step).to receive(:status).and_return(:failed)
149
+ allow(test_case).to receive(:failures).and_return(failures)
150
+ cucumber.before_steps(step)
151
+ allow(CI::Reporter::CucumberFailure).to receive(:new).and_return(cucumber_failure)
210
152
  end
211
153
 
212
- it "should create a new cucumber failure with that step" do
213
- CI::Reporter::CucumberFailure.should_receive(:new).with(@step)
214
- @cucumber.after_steps(@step)
154
+ it "creates a new cucumber failure with that step" do
155
+ expect(CI::Reporter::CucumberFailure).to receive(:new).with(step)
156
+ cucumber.after_steps(step)
215
157
  end
216
158
 
217
- it "should add the failure to the suite's list of failures" do
218
- @failures.should be_empty
219
- @cucumber.after_steps(@step)
220
- @failures.should_not be_empty
221
- @failures.first.should == @cucumber_failure
159
+ it "adds the failure to the suite's list of failures" do
160
+ expect(failures).to be_empty
161
+ cucumber.after_steps(step)
162
+ expect(failures).to_not be_empty
163
+ expect(failures.first).to eql cucumber_failure
222
164
  end
223
165
  end
224
166
  end
@@ -1,13 +1,14 @@
1
1
  require File.dirname(__FILE__) + "/../../../spec_helper.rb"
2
2
  require 'rake'
3
-
4
- require 'ci/reporter/internal'
5
- include CI::Reporter::Internal
3
+ require 'ci/reporter/test_utils/unit'
6
4
 
7
5
  describe "ci_reporter ci:setup:cucumber task" do
6
+ include CI::Reporter::TestUtils::Unit
7
+
8
+ let(:rake) { Rake::Application.new }
9
+
8
10
  before(:each) do
9
- @rake = Rake::Application.new
10
- Rake.application = @rake
11
+ Rake.application = rake
11
12
  load CI_REPORTER_LIB + '/ci/reporter/rake/cucumber.rb'
12
13
  save_env "CI_REPORTS"
13
14
  save_env "CUCUMBER_OPTS"
@@ -19,19 +20,19 @@ describe "ci_reporter ci:setup:cucumber task" do
19
20
  Rake.application = nil
20
21
  end
21
22
 
22
- it "should set ENV['CUCUMBER_OPTS'] to include cucumber formatter args" do
23
- @rake["ci:setup:cucumber"].invoke
24
- ENV["CUCUMBER_OPTS"].should =~ /--format\s+CI::Reporter::Cucumber/
23
+ it "sets ENV['CUCUMBER_OPTS'] to include cucumber formatter args" do
24
+ rake["ci:setup:cucumber"].invoke
25
+ expect(ENV["CUCUMBER_OPTS"]).to match /--format\s+CI::Reporter::Cucumber/
25
26
  end
26
27
 
27
- it "should not set ENV['CUCUMBER_OPTS'] to require cucumber_loader" do
28
- @rake["ci:setup:cucumber"].invoke
29
- ENV["CUCUMBER_OPTS"].should_not =~ /.*--require\s+\S*cucumber_loader.*/
28
+ it "does not set ENV['CUCUMBER_OPTS'] to require cucumber_loader" do
29
+ rake["ci:setup:cucumber"].invoke
30
+ expect(ENV["CUCUMBER_OPTS"]).to_not match /.*--require\s+\S*cucumber_loader.*/
30
31
  end
31
32
 
32
- it "should append to ENV['CUCUMBER_OPTS'] if it already contains a value" do
33
+ it "appends to ENV['CUCUMBER_OPTS'] if it already contains a value" do
33
34
  ENV["CUCUMBER_OPTS"] = "somevalue".freeze
34
- @rake["ci:setup:cucumber"].invoke
35
- ENV["CUCUMBER_OPTS"].should =~ /somevalue.*\s--format\s+CI::Reporter::Cucumber/
35
+ rake["ci:setup:cucumber"].invoke
36
+ expect(ENV["CUCUMBER_OPTS"]).to match /somevalue.*\s--format\s+CI::Reporter::Cucumber/
36
37
  end
37
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_reporter_cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger
@@ -9,7 +9,7 @@ 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-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 2.0.0.alpha1
34
+ version: 2.0.0.alpha2
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 2.0.0.alpha1
41
+ version: 2.0.0.alpha2
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: bundler
44
44
  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
@@ -104,6 +132,7 @@ files:
104
132
  - lib/ci/reporter/cucumber/version.rb
105
133
  - lib/ci/reporter/rake/cucumber.rb
106
134
  - lib/ci/reporter/rake/cucumber_loader.rb
135
+ - spec/ci/reporter/cucumber_failure_spec.rb
107
136
  - spec/ci/reporter/cucumber_spec.rb
108
137
  - spec/ci/reporter/rake/rake_tasks_spec.rb
109
138
  - spec/spec_helper.rb
@@ -136,6 +165,7 @@ test_files:
136
165
  - acceptance/cucumber/cucumber_example.feature
137
166
  - acceptance/cucumber/step_definitions/development_steps.rb
138
167
  - acceptance/verification_spec.rb
168
+ - spec/ci/reporter/cucumber_failure_spec.rb
139
169
  - spec/ci/reporter/cucumber_spec.rb
140
170
  - spec/ci/reporter/rake/rake_tasks_spec.rb
141
171
  - spec/spec_helper.rb