mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix test failures only seen when executed via bin/test
sub_template_message distracts Rails.root from its message only when Rails.root is defined, and Rails.root is defined at tools/test.rb
This commit is contained in:
parent
f21c2492e5
commit
aa647b46cc
1 changed files with 1 additions and 1 deletions
|
@ -253,7 +253,7 @@ module RenderTestCases
|
|||
def test_render_sub_template_with_errors
|
||||
e = assert_raises(ActionView::Template::Error) { @view.render(template: "test/sub_template_raise") }
|
||||
assert_match %r!method.*doesnt_exist!, e.message
|
||||
assert_equal "Trace of template inclusion: #{File.expand_path("#{FIXTURE_LOAD_PATH}/test/sub_template_raise.html.erb")}", e.sub_template_message
|
||||
assert_equal "Trace of template inclusion: #{File.expand_path("#{FIXTURE_LOAD_PATH}/test/sub_template_raise.html.erb").sub("#{Rails.root}/", "")}", e.sub_template_message
|
||||
assert_equal "1", e.line_number
|
||||
assert_equal File.expand_path("#{FIXTURE_LOAD_PATH}/test/_raise.html.erb"), e.file_name
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue