diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-30 07:45:49 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-30 07:45:49 +0000 |
commit | 03da71a9ae194cb2b47318b85b47c6b1001fe1b0 (patch) | |
tree | 06228c5cfc356582ed842ec0e2fdf257106fd6a4 /test/ruby | |
parent | da20411b5127108f83188dbb7ca7a150687010c0 (diff) |
revert r45747 because it introduced severe incompatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/envutil.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index cfc16d1d86..948cbc25bc 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -379,29 +379,6 @@ eom AssertFile end - def assert_raise_with_message(exception, expected, msg = nil, &block) - case expected - when String - assert = :assert_equal - when Regexp - assert = :assert_match - else - raise TypeError, "Expected #{expected.inspect} to be a kind of String or Regexp, not #{expected.class}" - end - - ex = assert_raise(exception, *msg) {yield} - msg = message(msg, "") {"Expected Exception(#{exception}) was raised, but the message doesn't match"} - - if assert == :assert_equal - assert_equal(expected, ex.message, msg) - else - msg = message(msg) { "Expected #{mu_pp expected} to match #{mu_pp ex.message}" } - assert expected =~ ex.message, msg - block.binding.eval("proc{|_|$~=_}").call($~) - end - ex - end - class << (AssertFile = Struct.new(:message).new) include Assertions def assert_file_predicate(predicate, *args) |