Sha256: 7c0850d18fd1cc9d3a87f6f880e8e56d60187df5d6d5224060a72d5673d2903a

Contents?: true

Size: 467 Bytes

Versions: 22

Compression:

Stored size: 467 Bytes

Contents

require 'rspec'
require 'cantango'

def config_folder 
  File.dirname(__FILE__)+ "/../../../fixtures/config/"
end

describe 'Load Categories rules' do
  let (:file) do
    File.join(config_folder, 'categories.yml')
  end

  it "should load a categories file" do
    loader = CanTango::PermissionEngine::Loader::Categories.new file
   
    loader.categories['user_models'].should include('Admin')
    loader.categories['articles'].should include('Article')
  end 
end

Version data entries

22 entries across 22 versions & 1 rubygems

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