Skip to content

Instantly share code, notes, and snippets.

@jeromelefeuvre
Created January 11, 2012 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeromelefeuvre/1593797 to your computer and use it in GitHub Desktop.
Save jeromelefeuvre/1593797 to your computer and use it in GitHub Desktop.
Translate filter for liquid
# -*- 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