Skip to content

Commit

Permalink
fix rails main (#2074)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhawksley authored Aug 20, 2024
1 parent 5464c08 commit e50ad2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/sandbox/test/rendering_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,8 @@ def test_backtrace_returns_correct_file_and_line_number
render_inline(ExceptionInTemplateComponent.new)
end

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

def test_render_collection
Expand Down

0 comments on commit e50ad2c

Please sign in to comment.