daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest May 16th, 2018 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
Top