Sha256: a1d6ad42b454d56df9779cbde475b5f09e04df2b2f8e49c1147f8ebc5969a973

Contents?: true

Size: 1.01 KB

Versions: 11

Compression:

Stored size: 1.01 KB

Contents

require 'spec_helper'
require 'fixtures/models'

describe CanTango::Configuration::Autoload do
  subject { CanTango.config.autoload }

  describe 'default settings' do
      its(:permits)     { should be_true }
      its(:models)      { should be_true }
  end

  describe 'permits' do
    describe 'turn off' do
      before do
        subject.permits :off
      end

      its(:permits)     { should be_false }
      its(:permits?)    { should be_false }
    end

    describe 'turn on' do
      before do
        subject.permits :on
      end

      its(:permits)     { should be_true }
      its(:permits?)    { should be_true }
    end
  end

  describe 'models' do
    describe 'turn off' do
      before do
        subject.models :off
      end

      its(:models)      { should be_false }
      its(:models?)     { should be_false }
    end

    describe 'turn on' do
      before do
        subject.models :on
      end

      its(:models)      { should be_true }
      its(:models?)     { should be_true }
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cantango-config-0.1.9.2 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.8.1 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.8 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.7 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.6 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.5 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.4 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.3 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.2 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.1 spec/cantango/configuration/autoload_spec.rb
cantango-config-0.1.0 spec/cantango/configuration/autoload_spec.rb