Sha256: 80fc8567373d703c537c78cc7fe8bcefce6d00c1ce91c599b5aef3921003d4cc
Contents?: true
Size: 1.41 KB
Versions: 15
Compression:
Stored size: 1.41 KB
Contents
require 'spec' require 'RubyExt/Localization/require' module RubyExt describe "RubyExt::Localization" do before :each do RubyExt::Localization.default_language = :en RubyExt::Localization.language = nil end it "Default Language" do ForLocalization::NS::B.new.message.should == "English" RubyExt::Localization.default_language = :ru ForLocalization::NS::B.new.message.should == "Russian" end it "Not Localized" do RubyExt::Localization.default_language = :ru ForLocalization::NS::B.new.not_localized.should == "English Not Localized" end it "Language set" do ForLocalization::NS::B.new.message.should == "English" RubyExt::Localization.language = lambda{:ru} ForLocalization::NS::B.new.message.should == "Russian" end it "Language not set" do RubyExt::Localization.language = lambda{nil} ForLocalization::NS::B.new.message.should == "English" end it "Class Hierarchy" do RubyExt::Localization.language = lambda{:ru} ForLocalization::NS::B.new.class_hierarchy_message.should == "Class Hierarchy Russian" end it "Namespace Hierarchy" do RubyExt::Localization.language = lambda{:ru} ForLocalization::NS::B.new.namespace_hierarchy_message.should == "Namespace Hierarchy Russian" end it "Substitution" do RubyExt::Localization.language = lambda{:ru} ForLocalization::NS::B.new.substitution.should == "Russian 10" end end end
Version data entries
15 entries across 15 versions & 2 rubygems