# File lib/mocha/mockery.rb, line 129
129:     def on_stubbing_method_on_nil(object, method)
130:       if Mocha::Configuration.prevent?(:stubbing_method_on_nil)
131:         raise StubbingError.new("stubbing method on nil: #{object.mocha_inspect}.#{method}", caller)
132:       end
133:       if Mocha::Configuration.warn_when?(:stubbing_method_on_nil)
134:         logger.warn "stubbing method on nil: #{object.mocha_inspect}.#{method}"
135:       end
136:     end