summaryrefslogtreecommitdiff
path: root/lib/test/unit/assertions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test/unit/assertions.rb')
-rw-r--r--lib/test/unit/assertions.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index 2e9fadf..de357d0 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) }