Sha256: c36c512df642db23a232c9a34eae69d19c8dde233b461c5d09586f83eac485b5

Contents?: true

Size: 849 Bytes

Versions: 35

Compression:

Stored size: 849 Bytes

Contents

shared_examples_for 'Registry' do
  describe 'default settings' do
    
    #its(:registered)  { should be_empty }

    it 'should register groups' do
      subject.register(:a, :b)
      subject.registered.should include(:a, :b)
    end

    it 'should set defaults' do
      subject.default = :a, :b
      subject.default.should include(:a, :b)
    end
  end

  describe 'register' do
    before do
      subject.register :abc, :def
    end
    its(:registered) { should include(:abc, :def) }
  end

  describe 'append <<' do
    before do
      subject.clean!
      subject.register :abc, :def
      subject << :xyz
    end
    its(:registered) { should include(:abc, :def, :xyz) }
  end

  describe 'get index []' do
    before do
      subject.clean!
      subject.register :abc, :def
    end
    specify {subject[0].should == :abc }
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
cantango-config-0.2.1 spec/cantango/registry/shared/base_ex.rb
cantango-config-0.2.0 spec/cantango/registry/shared/base_ex.rb
cantango-roles-0.1.0 spec/cantango/configuration/shared/registry_ex.rb
cantango-config-0.1.9.2 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.8.1 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.8 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.7 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.6 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.5 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.4 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.3 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.2 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.1 spec/cantango/configuration/shared/registry/base_ex.rb
cantango-config-0.1.0 spec/cantango/configuration/shared/registry_ex.rb
cantango-0.9.4.7 spec/cantango/configuration/shared/registry_ex.rb
cantango-0.9.4.6 spec/cantango/configuration/shared/registry_ex.rb
cantango-0.9.4.5 spec/cantango/configuration/shared/registry_ex.rb
cantango-0.9.4.3 spec/cantango/configuration/shared/registry_ex.rb
cantango-0.9.4.2 spec/cantango/configuration/shared/registry_ex.rb
cantango-0.9.4.1 spec/cantango/configuration/shared/registry_ex.rb