Seperate unit and integration tests.

This makes it easier to re-use the integration tests in a seperate gem that
optimizes parts of liquid with a native implementation.
This commit is contained in:
Dylan Thacker-Smith
2014-03-26 15:47:07 -04:00
parent 3dbb35d823
commit 7e45155aa9
43 changed files with 194 additions and 166 deletions
+19
View File
@@ -0,0 +1,19 @@
require 'test_helper'
class TemplateUnitTest < Test::Unit::TestCase
include Liquid
def test_sets_default_localization_in_document
t = Template.new
t.parse('')
assert_instance_of I18n, t.root.options[:locale]
end
def test_sets_default_localization_in_context_with_quick_initialization
t = Template.new
t.parse('{{foo}}', :locale => I18n.new(fixture("en_locale.yml")))
assert_instance_of I18n, t.root.options[:locale]
assert_equal fixture("en_locale.yml"), t.root.options[:locale].path
end
end