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)
979979 @deprecator . behavior = -> ( message , *) { @message = message }
980980 method_that_emits_deprecation_with_internal_method ( @deprecator )
981981
982- assert_not_includes ( @message , "internal " )
982+ assert_includes ( @message , "/path/to/user/code.rb " )
983983 end
984984
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+
985991 private
986992 def method_that_emits_deprecation ( deprecator )
987993 deprecator . warn
988994 end
989995
990- def method_that_emits_deprecation_with_internal_method ( deprecator )
991- [ 1 ] . each { deprecator . warn }
992- end
993-
994996 def with_rails_application_deprecators ( &block )
995997 application = Struct . new ( :deprecators ) . new ( ActiveSupport ::Deprecation ::Deprecators . new )
996998 rails = Struct . new ( :application ) . new ( application )
You can’t perform that action at this time.
0 commit comments