on_stubbing_method_unnecessarily (Mocha::Mockery)

         # File lib/mocha/mockery.rb, line 133
    133:     def on_stubbing_method_unnecessarily(expectation)
    134:       if Mocha::Configuration.prevent?(:stubbing_method_unnecessarily)
    135:         raise StubbingError.new("stubbing method unnecessarily: #{expectation.method_signature}", expectation.backtrace)
    136:       end
    137:       if Mocha::Configuration.warn_when?(:stubbing_method_unnecessarily)
    138:         logger.warn "stubbing method unnecessarily: #{expectation.method_signature}"
    139:       end
    140:     end