Skip to content

Commit e50ad2c

Browse files
authored
fix rails main (#2074)
1 parent 5464c08 commit e50ad2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/sandbox/test/rendering_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,8 @@ def test_backtrace_returns_correct_file_and_line_number
564564
render_inline(ExceptionInTemplateComponent.new)
565565
end
566566

567-
assert_match %r{app/components/exception_in_template_component\.html\.erb:2}, error.backtrace[0]
567+
component_error_index = (Rails::VERSION::STRING < "8.0") ? 0 : 1
568+
assert_match %r{app/components/exception_in_template_component\.html\.erb:2}, error.backtrace[component_error_index]
568569
end
569570

570571
def test_render_collection

0 commit comments

Comments
 (0)