Skip to content

Commit

Permalink
Merge pull request #33 from fschwahn/add_tests_for_empty_templates
Browse files Browse the repository at this point in the history
Add more tests for empty templates
  • Loading branch information
bolandrm committed Jan 13, 2016
2 parents abdf79a + 91ded2b commit fce7b73
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/engine_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,17 @@ def test_empty_template
output = Engine.new('').render
assert_equal '', output
end

def test_empty_template_returns_a_new_object
input = ''
output = Engine.new(input).render
assert input.object_id != output.object_id, 'empty template must return a new object'
end

def test_empty_template_encoding_matches_input
input = ''.force_encoding("ISO-8859-1")
output = Engine.new(input).render
assert_equal input.encoding, output.encoding
end
end
end

0 comments on commit fce7b73

Please sign in to comment.