~ubuntu-branches/ubuntu/vivid/ruby-i18n/vivid

« back to all changes in this revision

Viewing changes to test/backend/fallbacks_test.rb

  • Committer: Package Import Robot
  • Author(s): Praveen Arimbrathodiyil
  • Date: 2013-06-03 19:20:31 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20130603192031-qk11as87x3cotd1n
Tags: upstream-0.6.1
ImportĀ upstreamĀ versionĀ 0.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    assert_equal "Default Bar", I18n.t(:missing_bar, :locale => :'de-DE', :default => Proc.new { "Default Bar" })
49
49
  end
50
50
 
 
51
  test "returns the :de translation for a missing :'de-DE' when :default is a Hash" do
 
52
    assert_equal 'Bar in :de', I18n.t(:bar, :locale => :'de-DE', :default => {})
 
53
    assert_equal({}, I18n.t(:missing_bar, :locale => :'de-DE', :default => {}))
 
54
  end
 
55
 
51
56
  test "returns the :'de-DE' default :baz translation for a missing :'de-DE' when defaults contains Symbol" do
52
57
    assert_equal 'Baz in :de-DE', I18n.t(:missing_foo, :locale => :'de-DE', :default => [:baz, "Default Bar"])
53
58
  end