--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Constrains the <tt>mock</tt> so that it can only expect or stub methods to which <tt>responder</tt> responds. The constraint is only applied at method invocation time.
- !ruby/struct:SM::Flow::P 
  body: A <tt>NoMethodError</tt> will be raised if the <tt>responder</tt> does not <tt>respond_to?</tt> a method invocation (even if the method has been expected or stubbed).
- !ruby/struct:SM::Flow::P 
  body: The <tt>mock</tt> will delegate its <tt>respond_to?</tt> method to the <tt>responder</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "  class Sheep\n    def chew(grass); end\n    def self.number_of_legs; end\n  end\n\n  sheep = mock('sheep')\n  sheep.expects(:chew)\n  sheep.expects(:foo)\n  sheep.respond_to?(:chew) # =&gt; true\n  sheep.respond_to?(:foo) # =&gt; true\n  sheep.chew\n  sheep.foo\n  # no error raised\n\n  sheep = mock('sheep')\n  sheep.responds_like(Sheep.new)\n  sheep.expects(:chew)\n  sheep.expects(:foo)\n  sheep.respond_to?(:chew) # =&gt; true\n  sheep.respond_to?(:foo) # =&gt; false\n  sheep.chew\n  sheep.foo # =&gt; raises NoMethodError exception\n\n  sheep_class = mock('sheep_class')\n  sheep_class.responds_like(Sheep)\n  sheep_class.stubs(:number_of_legs).returns(4)\n  sheep_class.expects(:foo)\n  sheep_class.respond_to?(:number_of_legs) # =&gt; true\n  sheep_class.respond_to?(:foo) # =&gt; false\n  assert_equal 4, sheep_class.number_of_legs\n  sheep_class.foo # =&gt; raises NoMethodError exception\n"
- !ruby/struct:SM::Flow::P 
  body: Aliased by <tt>quacks_like</tt>
full_name: Mocha::Mock#responds_like
is_singleton: false
name: responds_like
params: " responds_like(responder) -> mock\n"
visibility: public
