aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/template_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template/template_test.rb')
-rw-r--r--actionview/test/template/template_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/template/template_test.rb b/actionview/test/template/template_test.rb
index 3dc14e36e0..b348d1f17b 100644
--- a/actionview/test/template/template_test.rb
+++ b/actionview/test/template/template_test.rb
@@ -196,6 +196,13 @@ class TestERBTemplate < ActiveSupport::TestCase
assert_match(Regexp.new("\xFC"), e.message)
end
+ def test_template_is_marshalable
+ template = new_template
+ serialized = Marshal.load(Marshal.dump(template))
+ assert_equal template.identifier, serialized.identifier
+ assert_equal template.source, serialized.source
+ end
+
def with_external_encoding(encoding)
old = Encoding.default_external
Encoding::Converter.new old, encoding if old != encoding