Module: RSpec::Mocks::VerifyingDouble
- Defined in:
- lib/rspec/mocks/verifying_double.rb
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(message, *args, &block) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rspec/mocks/verifying_double.rb', line 20 def method_missing(, *args, &block) # Null object conditional is an optimization. If not a null object, # validity of method expectations will have been checked at definition # time. if null_object? if @__sending_message == __mock_proxy.ensure_implemented() else __mock_proxy.ensure_publicly_implemented(, self) end __mock_proxy.validate_arguments!(, args) end super end |