Sha256: 9d88a0247456d13de31f68d699cc49cc9edb1f6ec5bf5c1641ccaba54bf0b683

Contents?: true

Size: 982 Bytes

Versions: 1

Compression:

Stored size: 982 Bytes

Contents

require 'spec_helper'
require 'cantango/registry/shared/hash_ex'
require 'fixtures/models/project'

CanTango.debug!
connect_db
migrate

describe CanTango::Configuration::Models do
  let(:models) { CanTango.config.models }
  let(:orms) { CanTango.config.orms }
  
  it_should_behave_like "Hash Registry" do
    subject { models.actions }
    
    let(:hash1) do
      {:a => 1, :b => 2}
    end
    
    let(:hash2) do
      {:c => 3}
    end
  end
  
  subject { models } 
    
  describe 'available_models' do
    before do
      orms.register :active_record
    end

    specify { subject.available.should_not be_empty }
    specify { subject.available.should include('Project') }
  end

  describe 'use :guest_user' do
    before do
      subject.use :guest_user
    end
    specify { defined?(CanTango::Model::Guest).should be_true }
  end
  
  describe 'by_reg_exp' do
  end

  describe 'by_category' do
  end

  describe 'exclude' do
  end

  describe 'excluded' do
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cantango-config-0.2.0 spec/cantango/config/models_spec.rb