Sha256: 097464c1c1a35f9768584c50b8e53803aebec321934a52274edc7619d7c7ac24

Contents?: true

Size: 759 Bytes

Versions: 22

Compression:

Stored size: 759 Bytes

Contents

require 'rspec'
require 'cantango'

describe CanTango::PermissionEngine::Parser do
  context 'simple targets without categories' do
    let (:parser) do
      CanTango::Permission::Parser.new
    end

    let :targets do
      ['all', 'Article', 'Comment']
    end

    it 'should parse targets' do
      pending
      #puts parser.parse(targets)
    end
  end

  context 'targets using categories' do
    let (:categories) do
      cats = {:articles => ['Comment', 'Post']}
      CanTango::Configuration::Categories.new :my_categories, cats
    end

    let (:parser) do
      CanTango::PermissionEngine::Parser.new categories
    end

    let :targets do
      ['all', '@articles']
    end

    it 'should parse targets' do
      pending
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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