Permalink
Browse files

causes rspec without #622 to raise NoMethodError

  • Loading branch information...
1 parent 2d39c46 commit 6ab7614013c6ea6cb56e4213d71a7c9259bc5f70 @slyphon slyphon committed May 18, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/rspec/core/formatters/base_text_formatter_spec.rb
@@ -65,6 +65,15 @@ def run_all_and_dump_failures
end
end
+ context "with an exception that has an exception instance as its message" do
+ it "should not raise NoMethodError" do
+ gonzo_exception = RuntimeError.new
+ gonzo_exception.stub(:message) { gonzo_exception }
+ group.example("example name") { raise gonzo_exception }
+ expect { run_all_and_dump_failures }.not_to raise_error(NoMethodError)
+ end
+ end
+
context "with an exception class other than RSpec" do
it "does not show the error class" do
group.example("example name") { raise NameError.new('foo') }

0 comments on commit 6ab7614

Please sign in to comment.