Sha256: bd8d76bd273701c7e4e3bf84e704e0dad61faa7542453cd5c980d81e9ea6e83f

Contents?: true

Size: 622 Bytes

Versions: 3

Compression:

Stored size: 622 Bytes

Contents

require 'spec_helper'

module CanTango::Ability
  class Base
    include CanTango::Ability::Helper::Engine
    
    def calculate_rules
      can :edit, Project
    end
  end
end

class MyAccount
end

class User
  attr_accessor :account
end

describe CanTango::Ability::Helper::Engine do
  before do
    @user = User.new
  end
  
  subject do
    CanTango::Ability::Base.new @user
  end

  context 'Ability should have' do
    [:engines, :each_engine, :execute_engines!].each do |method_name|
      describe "#{method_name} method" do
        specify { subject.should respond_to(method_name) }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cantango-core-0.1.9.3 spec/cantango/ability/helper/engine_spec.rb
cantango-core-0.1.9.2 spec/cantango/ability/helper/engine_spec.rb
cantango-core-0.1.9.1 spec/cantango/ability/helper/engine_spec.rb