[前][次][番号順一覧][スレッド一覧]

ruby-changes:48299

From: nobu <ko1@a...>
Date: Wed, 25 Oct 2017 11:41:52 +0900 (JST)
Subject: [ruby-changes:48299] nobu:r60413 (trunk): Fix Mock.verify_call to mock_respond_to?

nobu	2017-10-25 11:41:47 +0900 (Wed, 25 Oct 2017)

  New Revision: 60413

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60413

  Log:
    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.

  Modified files:
    trunk/spec/mspec/lib/mspec/mocks/mock.rb
Index: spec/mspec/lib/mspec/mocks/mock.rb
===================================================================
--- spec/mspec/lib/mspec/mocks/mock.rb	(revision 60412)
+++ spec/mspec/lib/mspec/mocks/mock.rb	(revision 60413)
@@ -163,7 +163,7 @@ module Mock https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/mocks/mock.rb#L163
     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(' ')})")

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]