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

« back to all changes in this revision

Viewing changes to lib/i18n/tests/localization/date.rb

  • Committer: Package Import Robot
  • Author(s): Jonas Genannt
  • Date: 2013-11-27 19:26:54 UTC
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: package-import@ubuntu.com-20131127192654-ihh1sn3y680fvh29
Tags: upstream-0.6.5
ImportĀ upstreamĀ versionĀ 0.6.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
          assert_nothing_raised { I18n.l(@date, :format => '%x') }
45
45
        end
46
46
 
 
47
        test "localize Date: does not modify the options hash" do
 
48
          options = { :format => '%b', :locale => :de }
 
49
          assert_equal 'Mar', I18n.l(@date, options)
 
50
          assert_equal({ :format => '%b', :locale => :de }, options)
 
51
          assert_nothing_raised { I18n.l(@date, options.freeze) }
 
52
        end
 
53
 
47
54
        test "localize Date: given nil it raises I18n::ArgumentError" do
48
55
          assert_raise(I18n::ArgumentError) { I18n.l(nil) }
49
56
        end