Sha256: 07d2e947b1dc7ae471ef769013562ef0681537966ddf46a5a5d0384dc0422618

Contents?: true

Size: 579 Bytes

Versions: 39

Compression:

Stored size: 579 Bytes

Contents

require 'spec_helper'

describe Kuhsaft::Cms::AdminHelper do
  describe '#render_language_switch?' do
    context 'when there is one language' do
      before do
        I18n.stub(:available_locales).and_return([:de])
      end

      it 'returns false' do
        helper.render_language_switch?.should be_false
      end
    end

    context 'when there are multiple languages' do
      before do
        I18n.stub(:available_locales).and_return([:de, :en])
      end

      it 'returns true' do
        helper.render_language_switch?.should be_true
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
qbrick-2.5.0.pre spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.4.3 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.4.2 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.4.1 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.4.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.3.6 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.3.5 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.3.4 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.3.3 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.3.2 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.3.1 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.3.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.2.6 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.2.5 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.2.4 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.2.3 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.2.2 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.2.1 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.2.0 spec/helpers/kuhsaft/cms/admin_helper_spec.rb
kuhsaft-2.1.2 spec/helpers/kuhsaft/cms/admin_helper_spec.rb