Sha256: 6340dc2f4ecd0c8640120b5fcd66dabf02f4327c0dee6d874351da8cfceb3d08

Contents?: true

Size: 373 Bytes

Versions: 33

Compression:

Stored size: 373 Bytes

Contents

module Mocha

  class Deprecation

    class << self

      attr_accessor :mode, :messages

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

    end

    self.mode = :enabled
    self.messages = []

  end

end

Version data entries

33 entries across 28 versions & 3 rubygems

Version Path
mocha-0.12.3 lib/mocha/deprecation.rb
challah-0.7.0.pre vendor/bundle/gems/mocha-0.12.2/lib/mocha/deprecation.rb
mocha-0.12.2 lib/mocha/deprecation.rb
mocha-0.12.1 lib/mocha/deprecation.rb
mocha-0.12.0 lib/mocha/deprecation.rb
challah-0.6.2 vendor/bundle/gems/mocha-0.11.4/lib/mocha/deprecation.rb
challah-0.6.1 vendor/bundle/gems/mocha-0.11.4/lib/mocha/deprecation.rb
challah-0.6.0 vendor/bundle/gems/mocha-0.11.4/lib/mocha/deprecation.rb
mocha-0.11.4 lib/mocha/deprecation.rb
mocha-0.11.3 lib/mocha/deprecation.rb
mocha-0.11.2 lib/mocha/deprecation.rb
mocha-0.11.1 lib/mocha/deprecation.rb
mocha-0.11.0 lib/mocha/deprecation.rb