Sha256: 596246b04874f9dfa460e6084693b28492fc4f1ca21b88821260cfef1f19e07e
Contents?: true
Size: 813 Bytes
Versions: 42
Compression:
Stored size: 813 Bytes
Contents
require 'spec_helper' module ActiveadminSelleoCms describe ActiveadminSelleoCms::Locale do it "should find locale using method missing" do [:en, :pl].each do |locale_code| Locale.send(locale_code).should == Locale.find_by_code(locale_code) end end it "should return root url for locale" do Locale.en.url.should == "/en" end it "should return all enabled locales except the one(s) specified" do Locale.pl.update_attribute(:enabled, true) Locale.en.update_attribute(:enabled, true) Locale.enabled.count.should == 2 Locale.except(:pl).should_not include(Locale.pl) Locale.except(:pl).should include(:en) Locale.except([:en,:pl]).should_not include(:pl, :en) Locale.except([:en,:pl]).should be_empty end end end
Version data entries
42 entries across 42 versions & 1 rubygems