on_stubbing_method_unnecessarily (Mocha::Mockery)

         # File lib/mocha/mockery.rb, line 118
    118:     def on_stubbing_method_unnecessarily(expectation)
    119:       if Mocha::Configuration.prevent?(:stubbing_method_unnecessarily)
    120:         raise StubbingError.new("stubbing method unnecessarily: #{expectation.method_signature}", expectation.backtrace)
    121:       end
    122:       if Mocha::Configuration.warn_when?(:stubbing_method_unnecessarily)
    123:         logger.warn "stubbing method unnecessarily: #{expectation.method_signature}"
    124:       end
    125:     end