File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -979,18 +979,20 @@ def generated_method_that_call_deprecation(deprecator)
979
979
@deprecator . behavior = -> ( message , *) { @message = message }
980
980
method_that_emits_deprecation_with_internal_method ( @deprecator )
981
981
982
- assert_not_includes ( @message , "internal " )
982
+ assert_includes ( @message , "/path/to/user/code.rb " )
983
983
end
984
984
985
+ class_eval ( <<~RUBY , "/path/to/user/code.rb" , 1 )
986
+ def method_that_emits_deprecation_with_internal_method(deprecator)
987
+ [1].each { deprecator.warn }
988
+ end
989
+ RUBY
990
+
985
991
private
986
992
def method_that_emits_deprecation ( deprecator )
987
993
deprecator . warn
988
994
end
989
995
990
- def method_that_emits_deprecation_with_internal_method ( deprecator )
991
- [ 1 ] . each { deprecator . warn }
992
- end
993
-
994
996
def with_rails_application_deprecators ( &block )
995
997
application = Struct . new ( :deprecators ) . new ( ActiveSupport ::Deprecation ::Deprecators . new )
996
998
rails = Struct . new ( :application ) . new ( application )
You can’t perform that action at this time.
0 commit comments