Class: Mocha::MockClass
Instance Attribute Summary
Attributes included from MockMethods
#stub_everything
Class Method Summary
collapse
expectations, expects, matching_expectation, method_missing, respond_to?, stubs, super_method_missing, unexpected_method_called, verify
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Mocha::MockMethods
Class Method Details
17
|
# File 'lib/auto_mocha/mock_class.rb', line 17
alias_method :__new__, :new
|
.inherited(subclass) ⇒ Object
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/auto_mocha/mock_class.rb', line 23
def inherited(subclass)
subclass.class_eval do
def self.new(*arguments, &block)
__new__(*arguments, &block)
end
end
end
|
.new(*arguments, &block) ⇒ Object
19
20
21
|
# File 'lib/auto_mocha/mock_class.rb', line 19
def new(*arguments, &block)
method_missing(:new, *arguments, &block)
end
|
.super_method_missing(symbol, *arguments, &block) ⇒ Object
13
14
15
|
# File 'lib/auto_mocha/mock_class.rb', line 13
def super_method_missing(symbol, *arguments, &block)
superclass.method_missing(symbol, *arguments, &block)
end
|