aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/render_test.rb
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-01-23 02:57:52 +0530
committerVipul A M <vipulnsward@gmail.com>2016-02-12 23:10:33 +0530
commit632938cfda8762a98a7c7a360a6f05c29d2cdb5e (patch)
tree055c53a1a97d28018b03d07373995c000bbc7ee1 /actionview/test/template/render_test.rb
parentf709682697dd1654e4251e7c3db30e054910cccb (diff)
downloadrails-632938cfda8762a98a7c7a360a6f05c29d2cdb5e.tar.gz
rails-632938cfda8762a98a7c7a360a6f05c29d2cdb5e.tar.bz2
rails-632938cfda8762a98a7c7a360a6f05c29d2cdb5e.zip
WIP: Errors in logs should show log tags as well.
- Changed formatted_code_for to return array of logs to be tagged for each line - Changed some render tests to match new behaviour of return Fixes #22979
Diffstat (limited to 'actionview/test/template/render_test.rb')
-rw-r--r--actionview/test/template/render_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb
index 333e0cca11..bf811abdd0 100644
--- a/actionview/test/template/render_test.rb
+++ b/actionview/test/template/render_test.rb
@@ -226,13 +226,13 @@ module RenderTestCases
assert_match %r!method.*doesnt_exist!, e.message
assert_equal "", e.sub_template_message
assert_equal "1", e.line_number
- assert_equal "1: <%= doesnt_exist %>", e.annoted_source_code.strip
+ assert_equal "1: <%= doesnt_exist %>", e.annoted_source_code[0].strip
assert_equal File.expand_path("#{FIXTURE_LOAD_PATH}/test/_raise.html.erb"), e.file_name
end
def test_render_error_indentation
e = assert_raises(ActionView::Template::Error) { @view.render(:partial => "test/raise_indentation") }
- error_lines = e.annoted_source_code.split("\n")
+ error_lines = e.annoted_source_code
assert_match %r!error\shere!, e.message
assert_equal "11", e.line_number
assert_equal " 9: <p>Ninth paragraph</p>", error_lines.second
@@ -252,7 +252,7 @@ module RenderTestCases
assert_match %r!method.*doesnt_exist!, e.message
assert_equal "", e.sub_template_message
assert_equal "1", e.line_number
- assert_equal "1: <%= doesnt_exist %>", e.annoted_source_code.strip
+ assert_equal "1: <%= doesnt_exist %>", e.annoted_source_code[0].strip
assert_equal File.expand_path("#{FIXTURE_LOAD_PATH}/test/_raise.html.erb"), e.file_name
end