Sha256: 06eedd8ce902415440f8a7bc150de7bce05cd9180d7932426d0821173d7bce5e

Contents?: true

Size: 1.02 KB

Versions: 22

Compression:

Stored size: 1.02 KB

Contents

require 'rspec'
require 'cantango'
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

22 entries across 22 versions & 1 rubygems

Version Path
cantango-0.9.4.7 spec/cantango/configuration/autoload_spec.rb
cantango-0.9.4.6 spec/cantango/configuration/autoload_spec.rb
cantango-0.9.4.5 spec/cantango/configuration/autoload_spec.rb
cantango-0.9.4.3 spec/cantango/configuration/autoload_spec.rb
cantango-0.9.4.2 spec/cantango/configuration/autoload_spec.rb
cantango-0.9.4.1 spec/cantango/configuration/autoload_spec.rb
cantango-0.9.4 spec/cantango/configuration/autoload_spec.rb
cantango-0.9.3.2 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.9.5 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.9.4 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.9.3 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.9.2 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.9.1 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.9 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.8.1 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.8 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.7 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.6.2 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.6.1 spec/cantango/configuration/autoload_spec.rb
cantango-0.8.6 spec/cantango/configuration/autoload_spec.rb