Sha256: 1f51bf52fea51cda82183f2320c132a734c41d065b035fec1a34936fbc41d6da
Contents?: true
Size: 1022 Bytes
Versions: 51
Compression:
Stored size: 1022 Bytes
Contents
# -*- coding: utf-8 -*- include GetText bindtextdomain("test1", :path => "locale") module TopLevelModule module_function def module_function _("language") end end class TopLevelClass def instance_method _("language") end def self.class_method _("language") end end def toplevel_method _("language") end class TestTextDomainToplevel < Test::Unit::TestCase include GetText def teardown GetText.locale = nil end def test_toplevel GetText.locale = "ja" assert_equal("japanese", toplevel_method) assert_equal("japanese", TopLevelModule.module_function) assert_equal("japanese", TopLevelClass.class_method) assert_equal("japanese", TopLevelClass.new.instance_method) GetText.bindtextdomain("test1", :path => "locale") assert_equal("japanese", toplevel_method) assert_equal("japanese", TopLevelModule.module_function) assert_equal("japanese", TopLevelClass.class_method) assert_equal("japanese", TopLevelClass.new.instance_method) end end
Version data entries
51 entries across 51 versions & 1 rubygems