Sha256: b083ad3bc9db7181229095da3c644dd2dbea158518813dd6c2e7092d779cf5aa
Contents?: true
Size: 682 Bytes
Versions: 4
Compression:
Stored size: 682 Bytes
Contents
require 'spec_helper' class AccessorTest include RailsLocaleDetection::LocaleAccessors end describe RailsLocaleDetection::LocaleAccessors do subject :object do AccessorTest.new end describe '#alternate_locales' do it "returns all available locales minus the current one" do object.current_locale = :en expect(object.alternate_locales).to eq([:fr]) end end describe '#available_locales' do it "shadows I18n.available_locales" do expect(object.available_locales).to eq([:en, :fr]) end end describe '#default_locale' do it "shadows I18n.default locale" do expect(object.default_locale).to eq(:en) end end end
Version data entries
4 entries across 4 versions & 1 rubygems