test/test_i18n.rb in review-1.5.0 vs test/test_i18n.rb in review-1.6.0
- old
+ new
@@ -72,12 +72,14 @@
Dir.chdir(dir) do
file = File.join(dir, "locale.yml")
File.open(file, "w"){|f| f.write("ja:\n foo: \"bar\"\nen:\n foo: \"buz\"\n")}
I18n.setup
assert_equal "bar", I18n.t("foo")
+ assert_equal "図", I18n.t("image")
I18n.setup("en")
assert_equal "buz", I18n.t("foo")
+ assert_equal "Figure ", I18n.t("image")
end
end
end
def test_load_locale_invalid_yml
@@ -126,10 +128,10 @@
end
def test_htmlbuilder
_setup_htmlbuilder
actual = compile_block("={test} this is test.\n")
- assert_equal %Q|<h1 id="test"><a id="h1"></a>Chapter 1. this is test.</h1>\n|, actual
+ assert_equal %Q|<h1 id="test"><a id="h1"></a><span class="secno">Chapter 1. </span>this is test.</h1>\n|, actual
end
def _setup_htmlbuilder
I18n.setup "en"
@builder = HTMLBuilder.new()