rspec-core 2.10.0 → 2.10.1

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.
@@ -1,3 +1,12 @@
1
+ ### 2.10.1 / 2012-05-19
2
+ [full changelog](http://github.com/rspec/rspec-core/compare/v2.10.0...v2.10.1)
3
+
4
+ Bug fixes
5
+
6
+ * `RSpec.reset` properly reinits configuration and world
7
+ * Call `to_s` before `split` on exception messages that might not always be
8
+ Strings (slyphon)
9
+
1
10
  ### 2.10.0 / 2012-05-03
2
11
  [full changelog](http://github.com/rspec/rspec-core/compare/v2.9.0...v2.10.0)
3
12
 
@@ -66,8 +66,8 @@ module RSpec
66
66
  # Used internally to ensure examples get reloaded between multiple runs in
67
67
  # the same process.
68
68
  def self.reset
69
- world.reset
70
- configuration.reset
69
+ @world = nil
70
+ @configuration = nil
71
71
  end
72
72
 
73
73
  # Returns the global [Configuration](RSpec/Core/Configuration) object. While you
@@ -179,7 +179,7 @@ module RSpec
179
179
  exception = example.execution_result[:exception]
180
180
  output.puts "#{long_padding}#{red("Failure/Error:")} #{red(read_failed_line(exception, example).strip)}"
181
181
  output.puts "#{long_padding}#{red(exception.class.name << ":")}" unless exception.class.name =~ /RSpec/
182
- exception.message.split("\n").each { |line| output.puts "#{long_padding} #{red(line)}" } if exception.message
182
+ exception.message.to_s.split("\n").each { |line| output.puts "#{long_padding} #{red(line)}" } if exception.message
183
183
  if shared_group = find_shared_group(example)
184
184
  dump_shared_failure_info(shared_group)
185
185
  end
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Core
3
3
  module Version
4
- STRING = '2.10.0'
4
+ STRING = '2.10.1'
5
5
  end
6
6
  end
7
7
  end
@@ -65,6 +65,15 @@ describe RSpec::Core::Formatters::BaseTextFormatter do
65
65
  end
66
66
  end
67
67
 
68
+ context "with an exception that has an exception instance as its message" do
69
+ it "should not raise NoMethodError" do
70
+ gonzo_exception = RuntimeError.new
71
+ gonzo_exception.stub(:message) { gonzo_exception }
72
+ group.example("example name") { raise gonzo_exception }
73
+ expect { run_all_and_dump_failures }.not_to raise_error(NoMethodError)
74
+ end
75
+ end
76
+
68
77
  context "with an exception class other than RSpec" do
69
78
  it "does not show the error class" do
70
79
  group.example("example name") { raise NameError.new('foo') }
@@ -25,10 +25,9 @@ module RSpec::Core
25
25
  let(:err) { StringIO.new }
26
26
  let(:out) { StringIO.new }
27
27
 
28
- it "resets world and configuration" do
29
- RSpec.configuration.stub(:files_to_run) { [] }
30
- RSpec.configuration.should_receive(:reset)
31
- RSpec.world.should_receive(:reset)
28
+ it "tells RSpec to reset" do
29
+ RSpec.configuration.stub(:files_to_run => [])
30
+ RSpec.should_receive(:reset)
32
31
  RSpec::Core::Runner.run([], err, out)
33
32
  end
34
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.10.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2012-05-04 00:00:00.000000000 Z
14
+ date: 2012-05-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -368,7 +368,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
368
368
  version: '0'
369
369
  segments:
370
370
  - 0
371
- hash: 3126832362009095552
371
+ hash: -744205358983414776
372
372
  required_rubygems_version: !ruby/object:Gem::Requirement
373
373
  none: false
374
374
  requirements:
@@ -377,13 +377,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
377
377
  version: '0'
378
378
  segments:
379
379
  - 0
380
- hash: 3126832362009095552
380
+ hash: -744205358983414776
381
381
  requirements: []
382
382
  rubyforge_project: rspec
383
383
  rubygems_version: 1.8.24
384
384
  signing_key:
385
385
  specification_version: 3
386
- summary: rspec-core-2.10.0
386
+ summary: rspec-core-2.10.1
387
387
  test_files:
388
388
  - features/Autotest.md
389
389
  - features/README.md