Sha256: 6114c9a81861a5a93393291053da06b1416bfea9f9bb1e7cc89ae410341d34f1

Contents?: true

Size: 949 Bytes

Versions: 4

Compression:

Stored size: 949 Bytes

Contents

require 'cantango/config'
require 'fixtures/models'

CanTango.configure do |config|
  config.accounts.register :user, UserAccount
end

require 'spec_helper'

class AccountContext
  include CanTango::Api::Account
end

describe CanTango::Api::Account do
  subject { AccountContext.new }

  describe 'Ability API included' do
    [:account_ability, :current_account_ability].each do |name|
      specify { subject.should respond_to name }
    end
  end

  describe 'Can API included' do
    [:user_account_can?, :user_account_cannot?].each do |name|
      specify { subject.should respond_to name }
    end
  end

  describe 'Scope API included' do
    [:scope_account, :account_scope, :real_account].each do |name|
      specify { subject.should respond_to name }
    end
  end

  describe 'Session API included' do
    [:any_account, :active_account, :active_account=].each do |name|
      specify { subject.should respond_to name }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cantango-api-0.1.3 spec/cantango/api/account_spec.rb
cantango-api-0.1.2 spec/cantango/api/account_spec.rb
cantango-api-0.1.1 spec/cantango/api/account_spec.rb
cantango-api-0.1.0 spec/cantango/api/account_spec.rb