Module Expectations::MockRecorder
In: lib/expectations/mock_recorder.rb

Methods

Public Instance methods

[Source]

    # File lib/expectations/mock_recorder.rb, line 12
12:   def method_missing(sym, *args)
13:     super if method_stack.empty?
14:     method_stack << [sym, args]
15:     self
16:   end

[Source]

    # File lib/expectations/mock_recorder.rb, line 8
 8:   def method_stack
 9:     @method_stack ||= []
10:   end

[Source]

    # File lib/expectations/mock_recorder.rb, line 27
27:   def mocha_error_message(ex)
28:     ex.message
29:   end

[Source]

   # File lib/expectations/mock_recorder.rb, line 3
3:   def receive!(method)
4:     method_stack << [:expects, [method]]
5:     self
6:   end

[Source]

    # File lib/expectations/mock_recorder.rb, line 18
18:   def subject!
19:     method_stack.inject(subject) { |result, element| result.send element.first, *element.last }
20:     subject
21:   end

[Source]

    # File lib/expectations/mock_recorder.rb, line 23
23:   def verify
24:     true
25:   end

[Validate]