diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-15 12:22:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-15 12:22:50 +0000 |
commit | d197d3e56ece2447b9c68bd69f4b7223d1f28a3d (patch) | |
tree | 71d6b3da1f56eb31ee807f7b36abaea54247c017 /lib | |
parent | 92a17890342782c9b5195c952761ee56078c8bda (diff) | |
download | ruby-d197d3e56ece2447b9c68bd69f4b7223d1f28a3d.tar.gz ruby-d197d3e56ece2447b9c68bd69f4b7223d1f28a3d.tar.xz ruby-d197d3e56ece2447b9c68bd69f4b7223d1f28a3d.zip |
* lib/test/unit/assertions.rb (Test::Unit::Assertions): aliases
assert_not_ methods.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test/unit/assertions.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb index 2e9fadfe5..de357d0fe 100644 --- a/lib/test/unit/assertions.rb +++ b/lib/test/unit/assertions.rb @@ -122,6 +122,10 @@ EOT super if !caller[0].rindex(MiniTest::MINI_DIR, 0) || !obj.respond_to?(meth) end + instance_methods(true).grep(/\Arefute_/) do |m| + alias_method(('assert_not_' << m.to_s[/.*?_(.*)/, 1]), m) + end + def build_message(head, template=nil, *arguments) template &&= template.chomp template.gsub(/\?/) { mu_pp(arguments.shift) } |