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

Fix Mock.verify_call to mock_respond_to?

* spec/mspec/lib/mspec/mocks/mock.rb (Mock.verify_call): should
  pass arguments to as given, not packed in an array.
  mock_respond_to? expects 2 or 3 arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-10-25 02:41:47 +00:00
parent 9db92694b0
commit 82fb43153b

View file

@ -163,7 +163,7 @@ module Mock
end
if sym.to_sym == :respond_to?
mock_respond_to? obj, compare
mock_respond_to? obj, *args
else
SpecExpectation.fail_with("Mock '#{name_or_inspect obj}': method #{sym}\n",
"called with unexpected arguments (#{Array(compare).join(' ')})")