test/i18n/backend/redis_test.rb in redis-i18n-0.6.1 vs test/i18n/backend/redis_test.rb in redis-i18n-0.6.5

- old
+ new

@@ -19,9 +19,15 @@ I18n.backend.store_translations :en, :foo => { :bar => { :baz => :bang } } I18n.t(:"foo.bar.baz").must_equal(:bang) I18n.t(:"baz", :scope => :"foo.bar").must_equal(:bang) end + it "gets translations with count" do + I18n.backend.store_translations :en, :bar => { :one => :bar, :other => "%{count} bars" } + I18n.t(:bar, :count => 1).must_equal(:bar) + I18n.t(:bar, :count => 10).must_equal("10 bars") + end + it "raises an exception when a proc translation is being saved" do lambda { I18n.backend.store_translations :en, :foo => lambda {|| } }.must_raise RuntimeError end