@private
# File lib/rspec/mocks/proxy.rb, line 388 def initialize(order_group) @warn_about_expectations = true super(nil, order_group) end
# File lib/rspec/mocks/proxy.rb, line 396 def add_message_expectation(method_name, opts={}, &block) warn(method_name) if warn_about_expectations? super end
# File lib/rspec/mocks/proxy.rb, line 401 def add_negative_message_expectation(location, method_name, &implementation) warn(method_name) if warn_about_expectations? super end
# File lib/rspec/mocks/proxy.rb, line 406 def add_stub(method_name, opts={}, &implementation) warn(method_name) if warn_about_expectations? super end
# File lib/rspec/mocks/proxy.rb, line 413 def warn method_name source = CallerFilter.first_non_rspec_line Kernel.warn("An expectation of :#{method_name} was set on nil. Called from #{source}. Use allow_message_expectations_on_nil to disable warnings.") end