blob: 3971ec809c61d5d670be0e59d39c98fd2ae21816 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
require "abstract_unit"
class TemplateErrorTest < ActiveSupport::TestCase
def test_provides_original_message
error = ActionView::Template::Error.new("test", Exception.new("original"))
assert_equal "original", error.message
end
def test_provides_original_backtrace
original_exception = Exception.new
original_exception.set_backtrace(%W[ foo bar baz ])
error = ActionView::Template::Error.new("test", original_exception)
assert_equal %W[ foo bar baz ], error.backtrace
end
def test_provides_useful_inspect
error = ActionView::Template::Error.new("test", Exception.new("original"))
assert_equal "#<ActionView::Template::Error: original>", error.inspect
end
end
|