Class: Mocha::Mock

Inherits:
Object show all
Includes:
MockMethods
Defined in:
lib/mocha/mock.rb

Instance Attribute Summary

Attributes included from MockMethods

#stub_everything

Instance Method Summary collapse

Methods included from MockMethods

#expectations, #expects, #matching_expectation, #method_missing, #respond_to?, #stubs, #super_method_missing, #unexpected_method_called, #verify

Constructor Details

#initialize(stub_everything = false) ⇒ Mock

Returns a new instance of Mock.



8
9
10
# File 'lib/mocha/mock.rb', line 8

def initialize(stub_everything = false)
  @stub_everything = stub_everything
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Mocha::MockMethods