Sha256: d96cea95bd6f437983ac5a8060a718f2c3bc278a7b6ce2585cb0864c7ea8e11f

Contents?: true

Size: 590 Bytes

Versions: 15

Compression:

Stored size: 590 Bytes

Contents

require 'spec_helper' 

def api_fixture
  load 'fixtures/one_role_setup_unique_check.rb'
end

def api_migrate
  migrate('one_role')
end

def api_name
  :one_role
end

describe "Roles for Active Record: #{api_name}" do   
  require "roles_active_record/strategy/user_setup.rb"

  before do
    api_fixture
    default_user_setup    
  end

  describe '#valid_roles' do
    context ':guest role twice in list of valid roles' do
      it 'roles table should not have duplicate role :guest' do  
        Role.all.map(&:name).select{|n| n == 'guest'}.size.should == 1
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
roles_active_record-0.5.1 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.5.0 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.9 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.8 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.7 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.6.4 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.6.3 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.6.2 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.6.1 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.6 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.5 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.4 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.3 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.2 spec/roles_active_record/strategy/single/one_role_unique_spec.rb
roles_active_record-0.4.1 spec/roles_active_record/strategy/single/one_role_unique_spec.rb