Sha256: 46057c000f41574e9ab9605cc677b4f883c39fc134f9a571e0fbf8eecfa6dc68

Contents?: true

Size: 526 Bytes

Versions: 5

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

module DeprecationToolkit
  module RSpecPlugin
    extend self

    RSpec.configure do |config|
      config.before(:suite) do
        RSpecPlugin.before_suite
      end
    end

    def before_suite
      case ENV["DEPRECATION_BEHAVIOR"]
      when "r", "record", "record-deprecations"
        DeprecationToolkit::Configuration.behavior = DeprecationToolkit::Behaviors::Record
      end

      DeprecationToolkit.add_notify_behavior
      DeprecationToolkit.attach_subscriber
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
deprecation_toolkit-2.2.2 lib/deprecation_toolkit/rspec_plugin.rb
deprecation_toolkit-2.2.1 lib/deprecation_toolkit/rspec_plugin.rb
deprecation_toolkit-2.2.0 lib/deprecation_toolkit/rspec_plugin.rb
deprecation_toolkit-2.1.0 lib/deprecation_toolkit/rspec_plugin.rb
deprecation_toolkit-2.0.4 lib/deprecation_toolkit/rspec_plugin.rb