summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-11 16:25:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-11 16:26:00 +0900
commit30b4da2bc1300bb37c7d6cd3b097768a99ab4dba (patch)
tree96ca38d140cb24e731c5f1343f2c874553681258 /tool
parentcbda32cd98133d8a29a6219d00b1dfdad3308c5b (diff)
Update the test tool path
Diffstat (limited to 'tool')
-rw-r--r--tool/lib/core_assertions.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb
index b4090f2213..3bfc4ef32b 100644
--- a/tool/lib/core_assertions.rb
+++ b/tool/lib/core_assertions.rb
@@ -463,7 +463,7 @@ eom
ex
end
- MINI_DIR = File.join(File.dirname(File.expand_path(__FILE__)), "minitest") #:nodoc:
+ TEST_DIR = File.join(__dir__, "test/unit") #:nodoc:
# :call-seq:
# assert(test, [failure_message])
@@ -483,7 +483,7 @@ eom
when nil
msgs.shift
else
- bt = caller.reject { |s| s.start_with?(MINI_DIR) }
+ bt = caller.reject { |s| s.start_with?(TEST_DIR) }
raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt
end unless msgs.empty?
super
@@ -506,7 +506,7 @@ eom
return assert obj.respond_to?(meth, *priv), msg
end
#get rid of overcounting
- if caller_locations(1, 1)[0].path.start_with?(MINI_DIR)
+ if caller_locations(1, 1)[0].path.start_with?(TEST_DIR)
return if obj.respond_to?(meth)
end
super(obj, meth, msg)
@@ -529,7 +529,7 @@ eom
return assert !obj.respond_to?(meth, *priv), msg
end
#get rid of overcounting
- if caller_locations(1, 1)[0].path.start_with?(MINI_DIR)
+ if caller_locations(1, 1)[0].path.start_with?(TEST_DIR)
return unless obj.respond_to?(meth)
end
refute_respond_to(obj, meth, msg)