Sha256: c1fe2a2a58e74ab1a5f8b41b0bbe98aa1e2b8b67a483e03316d519f54baa03ff

Contents?: true

Size: 970 Bytes

Versions: 7

Compression:

Stored size: 970 Bytes

Contents

require 'spec_helper'

module Refinery
  module Core
    describe 'configuration' do
      describe '.site_name' do
        # reset any previously defined site name
        before do
          Refinery::Core.site_name = nil
        end

        context 'when set in configuration' do
          it 'returns name set by Refinery::Core.config' do
            Refinery::Core.stub(:site_name).and_return('Test Site Name')
            Refinery::Core.site_name.should eq('Test Site Name')
          end
        end

        context 'when set in locale file' do
          before do
            ::I18n.backend.store_translations :en, :refinery => {
              :core => {
                :config => {
                  :site_name => 'I18n Site Name'
                }
              }
            }
          end

          it 'returns name set in locale' do
            Refinery::Core.site_name.should eq('I18n Site Name')
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
refinerycms-core-2.0.10 spec/lib/refinery/core/configuration_spec.rb
refinerycms-core-2.0.9 spec/lib/refinery/core/configuration_spec.rb
refinerycms-core-2.0.8 spec/lib/refinery/core/configuration_spec.rb
refinerycms-core-2.0.7 spec/lib/refinery/core/configuration_spec.rb
refinerycms-core-2.0.6 spec/lib/refinery/core/configuration_spec.rb
refinerycms-core-2.0.5 spec/lib/refinery/core/configuration_spec.rb
refinerycms-core-2.0.4 spec/lib/refinery/core/configuration_spec.rb