Class: DeprecationToolkit::Behaviors::DeprecationIntroduced
- Inherits:
-
DeprecationException
- Object
- DeprecationToolkit::Behaviors::DeprecationIntroduced
- Defined in:
- lib/deprecation_toolkit/behaviors/raise.rb
Instance Method Summary collapse
-
#initialize(current_deprecations, recorded_deprecations) ⇒ DeprecationIntroduced
constructor
A new instance of DeprecationIntroduced.
Constructor Details
#initialize(current_deprecations, recorded_deprecations) ⇒ DeprecationIntroduced
Returns a new instance of DeprecationIntroduced.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/deprecation_toolkit/behaviors/raise.rb', line 24 def initialize(current_deprecations, recorded_deprecations) introduced_deprecations = current_deprecations - recorded_deprecations = if DeprecationToolkit::Configuration.test_runner == :rspec "You can record deprecations by adding the `DEPRECATION_BEHAVIOR='record'` ENV when running your specs." else "You can record deprecations by adding the `--record-deprecations` flag when running your tests." end = <<~EOM You have introduced new deprecations in the codebase. Fix or record them in order to discard this error. #{} #{introduced_deprecations.join("\n")} EOM super() end |