Class: DeprecationToolkit::Behaviors::DeprecationRemoved
- Inherits:
-
DeprecationException
- Object
- DeprecationToolkit::Behaviors::DeprecationRemoved
- Defined in:
- lib/deprecation_toolkit/behaviors/raise.rb
Instance Method Summary collapse
-
#initialize(current_deprecations, recorded_deprecations) ⇒ DeprecationRemoved
constructor
A new instance of DeprecationRemoved.
Constructor Details
#initialize(current_deprecations, recorded_deprecations) ⇒ DeprecationRemoved
Returns a new instance of DeprecationRemoved.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/deprecation_toolkit/behaviors/raise.rb', line 45 def initialize(current_deprecations, recorded_deprecations) removed_deprecations = recorded_deprecations - current_deprecations = if DeprecationToolkit::Configuration.test_runner == :rspec "You can re-record deprecations by setting the `DEPRECATION_BEHAVIOR='record'` ENV when running your specs." else "You can re-record deprecations by adding the `--record-deprecations` flag when running your tests." end = <<~EOM You have removed deprecations from the codebase. Thanks for being an awesome person. The recorded deprecations needs to be updated to reflect your changes. #{} #{removed_deprecations.join("\n")} EOM super() end |