aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2017-02-02 20:37:30 +0900
committerAkira Matsuda <ronnie@dio.jp>2017-02-02 20:37:30 +0900
commitaa647b46cce55ec12f5895e403c0d1b85502c8e0 (patch)
tree81c21ba637e9e406b3d17e77a1a7af216f85dab5 /actionview
parentf21c2492e519985ccf8ce95089a5aff74758e732 (diff)
downloadrails-aa647b46cce55ec12f5895e403c0d1b85502c8e0.tar.gz
rails-aa647b46cce55ec12f5895e403c0d1b85502c8e0.tar.bz2
rails-aa647b46cce55ec12f5895e403c0d1b85502c8e0.zip
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
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/template/render_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb
index 960b7a9d52..489b62ea8e 100644
--- a/actionview/test/template/render_test.rb
+++ b/actionview/test/template/render_test.rb
@@ -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