mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20:41 -07:00
Add fixture helper
This commit is contained in:
@@ -3,12 +3,8 @@ require 'test_helper'
|
|||||||
class I18nTest < Test::Unit::TestCase
|
class I18nTest < Test::Unit::TestCase
|
||||||
include Liquid
|
include Liquid
|
||||||
|
|
||||||
def en_locale_path
|
|
||||||
File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "en_locale.yml")
|
|
||||||
end
|
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@i18n = I18n.new en_locale_path
|
@i18n = I18n.new fixture("en_locale.yml")
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_simple_translate_string
|
def test_simple_translate_string
|
||||||
|
|||||||
@@ -21,6 +21,12 @@ Liquid::Template.error_mode = mode
|
|||||||
|
|
||||||
module Test
|
module Test
|
||||||
module Unit
|
module Unit
|
||||||
|
class TestCase
|
||||||
|
def fixture(name)
|
||||||
|
File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Assertions
|
module Assertions
|
||||||
include Liquid
|
include Liquid
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user