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

« back to all changes in this revision

Viewing changes to lib/i18n/tests/lookup.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:
41
41
        assert_nothing_raised { I18n.t(:foo, :locale => :xx) }
42
42
      end
43
43
 
 
44
      test "lookup: does not modify the options hash" do
 
45
        options = {}
 
46
        assert_equal "a", I18n.t(:string, options)
 
47
        assert_equal({}, options)
 
48
        assert_nothing_raised { I18n.t(:string, options.freeze) }
 
49
      end
 
50
 
44
51
      test "lookup: given an array of keys it translates all of them" do
45
52
        assert_equal %w(bar baz), I18n.t([:bar, :baz], :scope => [:foo])
46
53
      end