Sha256: 7afea5a31d1aba493a8680df93934f2a7faac6337635cc2586170e93a9be8adb
Contents?: true
Size: 926 Bytes
Versions: 18
Compression:
Stored size: 926 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe Language do describe "locale_id" do before(:all) do @language = Factory(:unmodified_language, :locale => 'zz', :supported => true) end it "should find the language id for the current locale" do I18n.should_receive(:locale).and_return(:zz) Language.locale_id(true).should == @language.id end end describe "supported_locale?" do before(:all) do @supported_locale = 'zz' @not_supported_locale = 'aa' @supported_language = Factory(:unmodified_language, :locale => @supported_locale, :supported => true) end it "should indicate the locale is supported" do Language.supported_locale?(@supported_locale, true).should be_true end it "should indicate the locale is not supported" do Language.supported_locale?(@not_supported_locale, true).should_not be_true end end end
Version data entries
18 entries across 18 versions & 1 rubygems