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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.6.4 (12/21/10)
2
+
3
+ - RSpec 2.2+ support (thanks emi)
4
+
1
5
  == 1.6.3
2
6
 
3
7
  - Thanks to yairgo and tylerkovacs for their assistance and prodding
@@ -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?
@@ -1,5 +1,5 @@
1
1
  module CI
2
2
  module Reporter
3
- VERSION = "1.6.3"
3
+ VERSION = "1.6.4"
4
4
  end
5
5
  end
@@ -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
- - 3
9
- version: 1.6.3
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-10-12 00:00:00 -05:00
17
+ date: 2010-12-21 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency