Sha256: 3911bafdc1861bf52b8beaaa13d5b51abb507c1fe1440929dd150c498428b286

Contents?: true

Size: 305 Bytes

Versions: 13

Compression:

Stored size: 305 Bytes

Contents

require 'mocha/deprecation'

module DeprecationDisabler
  def disable_deprecations
    original_mode = Mocha::Deprecation.mode
    Mocha::Deprecation.mode = :disabled
    begin
      yield
    ensure
      Mocha::Deprecation.mode = original_mode
    end
  end

  module_function :disable_deprecations
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
mocha-1.11.2 test/deprecation_disabler.rb
mocha-1.11.1 test/deprecation_disabler.rb
mocha-1.11.0 test/deprecation_disabler.rb
mocha-1.10.2 test/deprecation_disabler.rb
mocha-1.10.1 test/deprecation_disabler.rb
mocha-1.10.0 test/deprecation_disabler.rb
mocha-1.10.0.beta.1 test/deprecation_disabler.rb
mocha-1.10.0.alpha test/deprecation_disabler.rb
mocha-1.9.0 test/deprecation_disabler.rb
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/mocha-1.8.0/test/deprecation_disabler.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/mocha-1.8.0/test/deprecation_disabler.rb
mocha-1.8.0 test/deprecation_disabler.rb
mocha-1.7.0 test/deprecation_disabler.rb