class DeprecationToolkit::Behaviors::DeprecationMismatch
Public Class Methods
new(current_deprecations, recorded_deprecations)
click to toggle source
Calls superclass method
# File lib/deprecation_toolkit/behaviors/raise.rb, line 66 def initialize(current_deprecations, recorded_deprecations) record_message = if DeprecationToolkit::Configuration.test_runner == :rspec "You can re-record deprecations by adding 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 message = <<~EOM The recorded deprecations for this test doesn't match the one that got triggered. Fix or record the new deprecations to discard this error. #{record_message} ===== Expected #{recorded_deprecations.deprecations.join("\n")} ===== Actual #{current_deprecations.deprecations.join("\n")} EOM super(message) end