Permalink
Browse files

whitespace errors

  • Loading branch information...
rtomayko committed Mar 9, 2010
1 parent 313b4d4 commit 209eddcea1f2a51511c8f4e0f38a609bf2dd593c
Showing with 5 additions and 5 deletions.
  1. +1 −1 lib/tilt.rb
  2. +4 −4 test/tilt_erubistemplate_test.rb
View
@@ -400,7 +400,7 @@ def precompiled(locals)
# Erubis template implementation. See:
# http://www.kuwata-lab.com/erubis/
#
# ErubisTemplate supports the following additional options, which are not
# ErubisTemplate supports the following additional options, which are not
# passed down to the Erubis engine:
#
# :engine_class allows you to specify a custom engine class to use
@@ -77,22 +77,22 @@ class ErubisTemplateTest < Test::Unit::TestCase
assert_equal '2', template.render(scope)
assert_equal 'original value', scope.instance_variable_get(:@buf)
end
test "using Erubis::EscapedEruby subclass via :engine_class option" do
template = Tilt::ErubisTemplate.new(nil, :engine_class => ::Erubis::EscapedEruby) { |t| %(<%= "<p>Hello World!</p>" %>) }
assert_equal "&lt;p&gt;Hello World!&lt;/p&gt;", template.render
end
test "using :escape_html => true option" do
template = Tilt::ErubisTemplate.new(nil, :escape_html => true) { |t| %(<%= "<p>Hello World!</p>" %>) }
assert_equal "&lt;p&gt;Hello World!&lt;/p&gt;", template.render
end
test "using :escape_html => false option" do
template = Tilt::ErubisTemplate.new(nil, :escape_html => false) { |t| %(<%= "<p>Hello World!</p>" %>) }
assert_equal "<p>Hello World!</p>", template.render
end
test "erubis default does not escape html" do
template = Tilt::ErubisTemplate.new { |t| %(<%= "<p>Hello World!</p>" %>) }
assert_equal "<p>Hello World!</p>", template.render

0 comments on commit 209eddc

Please sign in to comment.