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-1.3.0 lib/mocha/deprecation.rb
mocha-1.2.1 lib/mocha/deprecation.rb
mocha-1.2.0 lib/mocha/deprecation.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/mocha-1.0.0/lib/mocha/deprecation.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/mocha-1.0.0/lib/mocha/deprecation.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/mocha-1.0.0/lib/mocha/deprecation.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/mocha-1.0.0/lib/mocha/deprecation.rb
mocha-1.1.0 lib/mocha/deprecation.rb
mocha-1.0.0 lib/mocha/deprecation.rb
mocha-1.0.0.alpha lib/mocha/deprecation.rb
tnargav-1.3.3 vendor/bundle/ruby/1.9.1/gems/mocha-0.14.0/lib/mocha/deprecation.rb
challah-1.0.0 vendor/bundle/gems/mocha-0.14.0/lib/mocha/deprecation.rb
tnargav-1.2.3 vendor/bundle/ruby/1.9.1/gems/mocha-0.14.0/lib/mocha/deprecation.rb
mocha-0.14.0 lib/mocha/deprecation.rb
challah-1.0.0.beta3 vendor/bundle/gems/mocha-0.13.3/lib/mocha/deprecation.rb
mocha-0.14.0.alpha lib/mocha/deprecation.rb
challah-1.0.0.beta2 vendor/bundle/gems/mocha-0.13.3/lib/mocha/deprecation.rb
challah-1.0.0.beta vendor/bundle/gems/mocha-0.13.3/lib/mocha/deprecation.rb
mocha-0.13.3 lib/mocha/deprecation.rb
mocha-0.13.2 lib/mocha/deprecation.rb