Sha256: b94a6b548fb43988d7acf704548d875e5c4f0dfeb6e37288ab966ed169d46e90

Contents?: true

Size: 470 Bytes

Versions: 1

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_examples 'deprecated class' do
  subject { deprecated_class.new }

  around do |example|
    old_deprec_behavior = ActiveSupport::Deprecation.behavior
    ActiveSupport::Deprecation.behavior = :raise
    example.run
    ActiveSupport::Deprecation.behavior = old_deprec_behavior
  end

  it 'raises an ActiveSupport::DeprecationException' do
    expect { subject }.to raise_error(ActiveSupport::DeprecationException)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
grape-1.8.0 spec/shared/deprecated_class_examples.rb