Guest User

Untitled

a guest
May 16th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # lib/spec/mocks/mock.rb
  2. module Spec
  3. module Mocks
  4. class Mock
  5. def method_missing(sym, *args, &block)
  6. __mock_proxy.record_message_received(sym, args, block)
  7. begin
  8. return self if __mock_proxy.null_object?
  9. super(sym, *args, &block)
  10. rescue NameError
  11. __mock_proxy.raise_unexpected_message_error sym, *args
  12. end
  13. end
  14. end
  15. end
  16. end
Add Comment
Please, Sign In to add comment