ci_reporter 1.6.3 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/ci/reporter/rspec.rb +1 -1
- data/lib/ci/reporter/version.rb +1 -1
- data/spec/ci/reporter/rspec_spec.rb +20 -0
- metadata +3 -3
data/History.txt
CHANGED
data/lib/ci/reporter/rspec.rb
CHANGED
@@ -51,7 +51,7 @@ module CI
|
|
51
51
|
class RSpec2Failure < RSpecFailure
|
52
52
|
def initialize(example)
|
53
53
|
@example = example
|
54
|
-
@exception = @example.execution_result[:exception_encountered]
|
54
|
+
@exception = @example.execution_result[:exception] || @example.execution_result[:exception_encountered]
|
55
55
|
end
|
56
56
|
|
57
57
|
def failure?
|
data/lib/ci/reporter/version.rb
CHANGED
@@ -123,4 +123,24 @@ describe "The RSpec reporter" do
|
|
123
123
|
@fmt.example_failed("should fail", 1, @error)
|
124
124
|
@fmt.dump_summary(0.1, 1, 0, 0)
|
125
125
|
end
|
126
|
+
|
127
|
+
describe 'RSpec2Failure' do
|
128
|
+
before(:each) do
|
129
|
+
@rspec20_example = mock('RSpec2.0 Example', :execution_result => {:exception_encountered => StandardError.new('rspec2.0 ftw')})
|
130
|
+
@rspec22_example = mock('RSpec2.2 Example', :execution_result => {:exception => StandardError.new('rspec2.2 ftw')})
|
131
|
+
end
|
132
|
+
|
133
|
+
it 'should handle rspec (< 2.2) execution results' do
|
134
|
+
failure = CI::Reporter::RSpec2Failure.new(@rspec20_example)
|
135
|
+
failure.name.should_not be_nil
|
136
|
+
failure.message.should == 'rspec2.0 ftw'
|
137
|
+
failure.location.should_not be_nil
|
138
|
+
end
|
139
|
+
it 'should handle rspec (>= 2.2) execution results' do
|
140
|
+
failure = CI::Reporter::RSpec2Failure.new(@rspec22_example)
|
141
|
+
failure.name.should_not be_nil
|
142
|
+
failure.message.should == 'rspec2.2 ftw'
|
143
|
+
failure.location.should_not be_nil
|
144
|
+
end
|
145
|
+
end
|
126
146
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 1.6.
|
8
|
+
- 4
|
9
|
+
version: 1.6.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nick Sieger
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-12-21 00:00:00 -06:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|