Sha256: 6ed06a605b2e91ded58c4650dc844a3877c158a8f4253cf411e650c01e0b1ffb

Contents?: true

Size: 615 Bytes

Versions: 9

Compression:

Stored size: 615 Bytes

Contents

require 'spec_helper'
require 'fixtures/models'

module CanTango::Ability
  class MyExecutor
    include CanTango::Ability::Executor
  end
end

describe CanTango::Ability::Executor do
  before do
    @user = User.new 'krisy', 'krisy@gmail.com'
    @ability = CanTango::Ability::Base.new @user
  end

  subject { CanTango::Ability::MyExecutor.new @ability }

  describe 'calculate_rules by default returns rules' do
    specify do
      subject.calculate_rules.should == []
    end
  end
  
  describe 'execute by default calls calculate_rules' do
    specify do
      subject.execute.should == []
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cantango-core-0.1.9.3 spec/cantango/ability/executor_spec.rb
cantango-core-0.1.9.2 spec/cantango/ability/executor_spec.rb
cantango-core-0.1.9.1 spec/cantango/ability/executor_spec.rb
cantango-core-0.1.9 spec/cantango/ability/executor_spec.rb
cantango-core-0.1.8 spec/cantango/ability/executor_spec.rb
cantango-core-0.1.7 spec/cantango/ability/executor_spec.rb
cantango-core-0.1.6 spec/cantango/ability/executor_spec.rb
cantango-core-0.1.5 spec/cantango/ability/executor_spec.rb
cantango-core-0.1.4 spec/cantango/ability/executor_spec.rb