Sha256: 509b352e7fcd77f5deb6a900e468405e36e211d31891b780f1baa5ff9c42c376

Contents?: true

Size: 662 Bytes

Versions: 3

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe(DeprecationToolkit::Behaviors::Raise) do
  before do
    @previous_configuration = DeprecationToolkit::Configuration.behavior
    DeprecationToolkit::Configuration.behavior = DeprecationToolkit::Behaviors::Disabled
  end

  after do
    DeprecationToolkit::Configuration.behavior = @previous_configuration
  end

  it '.trigger noop any deprecations' do |example|
    expect do
      ActiveSupport::Deprecation.warn("Foo")
      ActiveSupport::Deprecation.warn("Bar")

      DeprecationToolkit::TestTriggerer.trigger_deprecation_toolkit_behavior(example)
    end.not_to(raise_error)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
deprecation_toolkit-1.5.1 spec/deprecation_toolkit/behaviors/disabled_spec.rb
deprecation_toolkit-1.5.0 spec/deprecation_toolkit/behaviors/disabled_spec.rb
deprecation_toolkit-1.4.0 spec/deprecation_toolkit/behaviors/disabled_spec.rb