Fix Ruby 3.4 internal frame cleaner test
Fixup for c85eca47f0d5845bb23a252748610b6cc618c673
This commit is contained in:
parent
3e156142bf
commit
13dc2e7a1c
@ -979,18 +979,20 @@ def generated_method_that_call_deprecation(deprecator)
|
||||
@deprecator.behavior = ->(message, *) { @message = message }
|
||||
method_that_emits_deprecation_with_internal_method(@deprecator)
|
||||
|
||||
assert_not_includes(@message, "internal")
|
||||
assert_includes(@message, "/path/to/user/code.rb")
|
||||
end
|
||||
|
||||
class_eval(<<~RUBY, "/path/to/user/code.rb", 1)
|
||||
def method_that_emits_deprecation_with_internal_method(deprecator)
|
||||
[1].each { deprecator.warn }
|
||||
end
|
||||
RUBY
|
||||
|
||||
private
|
||||
def method_that_emits_deprecation(deprecator)
|
||||
deprecator.warn
|
||||
end
|
||||
|
||||
def method_that_emits_deprecation_with_internal_method(deprecator)
|
||||
[1].each { deprecator.warn }
|
||||
end
|
||||
|
||||
def with_rails_application_deprecators(&block)
|
||||
application = Struct.new(:deprecators).new(ActiveSupport::Deprecation::Deprecators.new)
|
||||
rails = Struct.new(:application).new(application)
|
||||
|
Loading…
Reference in New Issue
Block a user