Sha256: 1fd5cfaca3f7cfc449e80ba3f77bdd998c142a2af9f019f183df04729b598a14
Contents?: true
Size: 691 Bytes
Versions: 1
Compression:
Stored size: 691 Bytes
Contents
require 'spec_helper' require 'fixtures/models' require 'cantango/api/ability/dsl/relationship_ex' class User cantango end module CanTango::Ability class Base include CanTango::Api::Ability::Dsl def user candidate end def account candidate end end end describe CanTango::Api::Ability::Dsl do before do @user = User.new 'krisy', 'krisy@gmail.com' end subject { CanTango::Ability::Base.new @user } it_should_behave_like 'CanTango::Api::Ability::Dsl::Relationship' describe 'scope name, &block' do specify do subject.scope :user do |scope| scope.should be_a CanTango::Api::Ability::Scope end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cantango-api-0.1.3 | spec/cantango/api/ability/dsl_spec.rb |