Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better spec for default exception message of const_missing

  • Loading branch information...
commit bbd9c6f601aeededb3ad2a0badac2fb940bc70a3 1 parent d8f1f0e
@dbussink dbussink authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 spec/ruby/core/module/const_missing_spec.rb
View
6 spec/ruby/core/module/const_missing_spec.rb
@@ -17,9 +17,11 @@
end
it "raises NameError and does not include toplevel Object" do
- lambda {
+ begin
Object.const_missing("HelloMissing")
- }.should_not raise_error(NameError, /Object::HelloMissing/)
+ rescue NameError => e
+ e.message.should_not =~ / Object::/
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.