test_exception.rb: get rid of did_you_mean
* test/ruby/test_exception.rb (test_message_of_name_error): get rid of failure caused by did_you_mean message. [ruby-core:71282] [Bug #11640] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f5b2da3a53
commit
1c89b6bd1f
@ -723,14 +723,10 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
|
||||
end
|
||||
|
||||
def test_message_of_name_error
|
||||
begin
|
||||
assert_raise_with_message(NameError, /\Aundefined method `foo' for module `#<Module:.*>'$/) do
|
||||
Module.new do
|
||||
module_function :foo
|
||||
end
|
||||
rescue => e
|
||||
error = e
|
||||
end
|
||||
|
||||
assert_match /\Aundefined method `foo' for module `#<Module:.*>'\z/, error.message
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user