Sha256: 6419d0fe30e75c45224882f46b789908feb71d5d4258cc65d5e754d9352866fc

Contents?: true

Size: 441 Bytes

Versions: 21

Compression:

Stored size: 441 Bytes

Contents

require 'mocha/debug'

module Mocha

  class Deprecation

    class << self

      attr_accessor :mode, :messages

      def warning(message)
        @messages << message
        $stderr.puts "\n*** Mocha deprecation warning: #{message}\n\n" unless mode == :disabled
        $stderr.puts caller.join("\n  ") if mode == :debug
      end

    end

    self.mode = Debug::OPTIONS['debug'] ? :debug : :enabled
    self.messages = []

  end

end

Version data entries

21 entries across 18 versions & 4 rubygems

Version Path
mocha-0.13.1 lib/mocha/deprecation.rb