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.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index ac3ecf93c7..1358443285 100644
--- a/lib/test/unit/assertions.rb
+++ b/lib/test/unit/assertions.rb
@@ -113,6 +113,11 @@ EOT
assert(!actual.equal?(expected), msg)
end
+ # get rid of overcounting
+ def assert_respond_to obj, meth, msg = nil
+ super if !caller[0].rindex(MiniTest::MINI_DIR, 0) || !obj.respond_to?(meth)
+ end
+
def build_message(head, template=nil, *arguments)
template &&= template.chomp
template.gsub(/\?/) { mu_pp(arguments.shift) }