1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix condition of assert_not_respond_to

* test/lib/test/unit/assertions.rb (assert_not_respond_to): fix
  condition to assert.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-04-07 04:00:56 +00:00
parent 495b2a246f
commit 5c79f6dbb7

View file

@ -389,7 +389,7 @@ EOT
msg = message(msg) {
"Expected #{mu_pp(obj)} (#{obj.class}) to not respond to ##{meth}#{" privately" if priv[0]}"
}
return assert obj.respond_to?(meth, *priv), msg
return assert !obj.respond_to?(meth, *priv), msg
end
#get rid of overcounting
if caller_locations(1, 1)[0].path.start_with?(MINI_DIR)