Add fixture helper

This commit is contained in:
Simon Eskildsen
2013-08-15 10:06:08 -04:00
parent e7bcf04d1d
commit 0a2f21386d
2 changed files with 7 additions and 5 deletions

View File

@@ -3,12 +3,8 @@ require 'test_helper'
class I18nTest < Test::Unit::TestCase
include Liquid
def en_locale_path
File.join(File.expand_path(File.dirname(__FILE__)), "..", "fixtures", "en_locale.yml")
end
def setup
@i18n = I18n.new en_locale_path
@i18n = I18n.new fixture("en_locale.yml")
end
def test_simple_translate_string

View File

@@ -21,6 +21,12 @@ Liquid::Template.error_mode = mode
module Test
module Unit
class TestCase
def fixture(name)
File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", name)
end
end
module Assertions
include Liquid