Skip to content

Commit

Permalink
Build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jknack committed Apr 27, 2014
1 parent f009c00 commit decdf66
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
package com.github.jknack.handlebars.i293;

import java.io.IOException;
import java.util.Locale;

import org.apache.commons.lang3.LocaleUtils;
import org.junit.BeforeClass;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.github.jknack.handlebars.AbstractTest;
import com.github.jknack.handlebars.helper.I18nHelper;

public class Issue293 extends AbstractTest {

@BeforeClass
public static void overrideBundleName() {
@Before
public void overrideDefaults() {
I18nHelper.i18n.setDefaultBundle("i293");
I18nHelper.i18n.setDefaultLocale(LocaleUtils.toLocale("es_AR"));
}

@After
public void defaults() {
I18nHelper.i18n.setDefaultBundle("messages");
I18nHelper.i18n.setDefaultLocale(Locale.getDefault());
}

@Test
public void defaultI18N() throws IOException {
shouldCompileTo("{{i18n \"hello\"}}", $, "i293 AR");
Expand Down

0 comments on commit decdf66

Please sign in to comment.