Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding spec for multiple conditions.

  • Loading branch information...
commit 3f33ad5e72655e2d2d9d2c1e35582300f0c68ff3 1 parent 6435fa0
@fnando authored
View
2  .gitignore
@@ -1,5 +1,5 @@
doc
coverage
pkg
-test/tmp
+spec/tmp
.DS_Store
View
6 spec/i18n_spec.rb
@@ -88,6 +88,12 @@
File.should be_file(Rails.root.join("public/javascripts/tudo.js"))
end
+ it "exports with multiple conditions" do
+ set_config "multiple_conditions.yml"
+ SimplesIdeias::I18n.export!
+ File.should be_file(Rails.root.join("public/javascripts/bitsnpieces.js"))
+ end
+
it "filters translations using scope *.date.formats" do
result = SimplesIdeias::I18n.filter(translations, "*.date.formats")
result[:en][:date].keys.should == [:formats]
View
6 spec/resources/multiple_conditions.yml
@@ -0,0 +1,6 @@
+# Find more details about this configuration file at http://github.com/fnando/i18n-js
+translations:
+ - file: "public/javascripts/bitsnpieces.js"
+ only:
+ - "*.date.formats"
+ - "*.number.currency"
Please sign in to comment.
Something went wrong with that request. Please try again.