Skip to content

Commit

Permalink
causes rspec without rspec#622 to raise NoMethodError
Browse files Browse the repository at this point in the history
  • Loading branch information
slyphon committed May 18, 2012
1 parent 2d39c46 commit 6ab7614
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/rspec/core/formatters/base_text_formatter_spec.rb
Expand Up @@ -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') }
Expand Down

0 comments on commit 6ab7614

Please sign in to comment.