Sha256: 03b94ee1409f381cf0ccef2c2a11d7bc23c975a47849dfa96660e4ade31bb82d

Contents?: true

Size: 1.96 KB

Versions: 36

Compression:

Stored size: 1.96 KB

Contents

require 'spec_helper'

describe WoopleTheme::Configuration do
  describe "#profile_helper" do
    describe "when nothing is specified" do
      before do
        WoopleTheme.configure do |config|
          config.profile_helper = nil
        end
      end

      it "defaults to :profile_helper" do
        WoopleTheme.configuration.profile_helper.should == :profile_helper
      end
    end

    describe "when a custom profile_helper is specified" do
      before do
        WoopleTheme.configure do |config|
          config.profile_helper = :profile_model
        end
      end

      it "is used instead of the default" do
        WoopleTheme.configuration.profile_helper.should == :profile_model
      end
    end
  end

  describe "#menu_helper" do
    describe "when nothing is specified" do
      before do
        WoopleTheme.configure do |config|
          config.menu_helper = nil
        end
      end

      it "defaults to :menu_helper" do
        WoopleTheme.configuration.menu_helper.should == :menu_helper
      end
    end

    describe "when a custom menu_helper is specified" do
      before do
        WoopleTheme.configure do |config|
          config.menu_helper = :menu_model
        end
      end

      it "is used instead of the default" do
        WoopleTheme.configuration.menu_helper.should == :menu_model
      end
    end
  end

  describe "#layout_javascript" do
    describe "when nothing is specified" do
      before do
        WoopleTheme.configure do |config|
          config.layout_javascript = nil
        end
      end

      it "is nil" do
        WoopleTheme.configuration.layout_javascript.should be_nil
      end
    end

    describe "when a custom javascript layout is specified" do
      before do
        WoopleTheme.configure do |config|
          config.layout_javascript = 'javascript'
        end
      end

      it "is used instead of the default" do
        WoopleTheme.configuration.layout_javascript.should == 'javascript'
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
woople-theme-0.10.0 spec/configuration_spec.rb
woople-theme-0.9.0 spec/configuration_spec.rb
woople-theme-0.8.19 spec/configuration_spec.rb
woople-theme-0.8.18 spec/configuration_spec.rb
woople-theme-0.8.17 spec/configuration_spec.rb
woople-theme-0.8.16 spec/configuration_spec.rb
woople-theme-0.8.15 spec/configuration_spec.rb
woople-theme-0.8.14 spec/configuration_spec.rb
woople-theme-0.8.13 spec/configuration_spec.rb
woople-theme-0.8.12 spec/configuration_spec.rb
woople-theme-0.8.11 spec/configuration_spec.rb
woople-theme-0.8.10 spec/configuration_spec.rb
woople-theme-0.8.9 spec/configuration_spec.rb
woople-theme-0.8.8 spec/configuration_spec.rb
woople-theme-0.8.7 spec/configuration_spec.rb
woople-theme-0.8.6 spec/configuration_spec.rb
woople-theme-0.8.5 spec/configuration_spec.rb
woople-theme-0.8.4 spec/configuration_spec.rb
woople-theme-0.8.3 spec/configuration_spec.rb
woople-theme-0.8.2 spec/configuration_spec.rb