Skip to content
This repository
Browse code

Adding spec for multiple conditions.

  • Loading branch information...
commit 3f33ad5e72655e2d2d9d2c1e35582300f0c68ff3 1 parent 6435fa0
Nando Vieira authored November 03, 2010
2  .gitignore
... ...
@@ -1,5 +1,5 @@
1 1
 doc
2 2
 coverage
3 3
 pkg
4  
-test/tmp
  4
+spec/tmp
5 5
 .DS_Store
6  spec/i18n_spec.rb
@@ -88,6 +88,12 @@
88 88
     File.should be_file(Rails.root.join("public/javascripts/tudo.js"))
89 89
   end
90 90
 
  91
+  it "exports with multiple conditions" do
  92
+    set_config "multiple_conditions.yml"
  93
+    SimplesIdeias::I18n.export!
  94
+    File.should be_file(Rails.root.join("public/javascripts/bitsnpieces.js"))
  95
+  end
  96
+
91 97
   it "filters translations using scope *.date.formats" do
92 98
     result = SimplesIdeias::I18n.filter(translations, "*.date.formats")
93 99
     result[:en][:date].keys.should == [:formats]
6  spec/resources/multiple_conditions.yml
... ...
@@ -0,0 +1,6 @@
  1
+# Find more details about this configuration file at http://github.com/fnando/i18n-js
  2
+translations:
  3
+  - file: "public/javascripts/bitsnpieces.js"
  4
+    only:
  5
+      - "*.date.formats"
  6
+      - "*.number.currency"

0 notes on commit 3f33ad5

Please sign in to comment.
Something went wrong with that request. Please try again.