Created
January 11, 2012 08:58
-
-
Save jeromelefeuvre/1593797 to your computer and use it in GitHub Desktop.
Translate filter for liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding : utf-8 -*- | |
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') | |
include I18nHelper | |
describe I18nFilters do | |
include I18nFilters | |
before do | |
@client = Factory(:client) | |
@front_office = FrontOffice.create(Factory.attributes_for(:front_office, :use_templates => true, :internationalization => true)) | |
@context = {"frontoffice" => @front_office} | |
end | |
it "should return the correct code" do | |
key = "frontoffice.404.description" | |
translate(key).should eql @front_office.translate(key) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment