Method: Mocha::TerseObjectStub#method_missing

Defined in:
lib/mocha/shot/terse_object_stub.rb

#method_missing(method_name, *args, &block) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/mocha/shot/terse_object_stub.rb', line 7

def method_missing(method_name, *args, &block)
  if block
    @object.__stubs__(method_name).with(*args).returns(block)
  else
    @object.__stubs__(method_name).with(*args)
  end
end