From 8ff1b8e01f81efc1419110a4463fcf3b0c3b605a Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Thu, 28 May 2015 09:22:02 -0400 Subject: [PATCH] Test set_line_number_from_token after exception is converted. --- test/integration/error_handling_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/error_handling_test.rb b/test/integration/error_handling_test.rb index 0a5878c..54922ca 100644 --- a/test/integration/error_handling_test.rb +++ b/test/integration/error_handling_test.rb @@ -197,10 +197,10 @@ class ErrorHandlingTest < Minitest::Test end def test_exception_handler_with_exception_result - template = Liquid::Template.parse('This is a runtime error: {{ errors.runtime_error }}') + template = Liquid::Template.parse('This is a runtime error: {{ errors.runtime_error }}', line_numbers: true) handler = ->(e) { e.is_a?(Liquid::Error) ? e : InternalError.new('internal') } output = template.render({ 'errors' => ErrorDrop.new }, exception_handler: handler) - assert_equal 'This is a runtime error: Liquid error: internal', output + assert_equal 'This is a runtime error: Liquid error (line 1): internal', output assert_equal [InternalError], template.errors.map(&:class) end end