Sha256: c3aad5cb8b2ce2d307b7a3bdd752340a69e7ddca6022ca9fc69a0b8462d792b9
Contents?: true
Size: 712 Bytes
Versions: 26
Compression:
Stored size: 712 Bytes
Contents
# Run from your Rails main directory require 'test/test_helper' class TestActionViewIntegration < Test::Unit::TestCase def assert_renders(expected, input, extension) base = ActionView::Base.new actual = base.render_template(extension, input, "foo.#{extension}") assert_equal expected, actual end def test_erb assert_renders <<OUT, <<IN, :erb A & B A & B OUT <%= "A & B" %> <%= "A & B".mark_as_xss_protected %> IN end def test_rhtml assert_renders <<OUT, <<IN, :rhtml A & B A & B OUT <%= "A & B" %> <%= "A & B".mark_as_xss_protected %> IN end def test_haml assert_renders <<OUT, <<IN, :haml A & B A & B OUT = "A & B" = "A & B".mark_as_xss_protected IN end end
Version data entries
26 entries across 26 versions & 5 rubygems