Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # lib/spec/mocks/mock.rb
- module Spec
- module Mocks
- class Mock
- def method_missing(sym, *args, &block)
- __mock_proxy.record_message_received(sym, args, block)
- begin
- return self if __mock_proxy.null_object?
- super(sym, *args, &block)
- rescue NameError
- __mock_proxy.raise_unexpected_message_error sym, *args
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment