spec/models/user_spec.rb in private_person-0.3.1 vs spec/models/user_spec.rb in private_person-0.4.0

- old
+ new

@@ -1,10 +1,10 @@ require 'spec_helper' describe User do - describe PrivatePerson::Permitted do + describe 'acts_as_permitted' do it { should have_many(:permissions_as_permissor) } it { should have_many(:permissibles) } context 'Instance Methods' do @@ -38,30 +38,30 @@ describe '#permissions_by' do include_context 'permissions support' context 'when following' do subject { following_user.permissions_by(followed_user) } it { should be_an ActiveRecord::Relation } - its(:first) { should be_a Permission } + its(:first) { should be_a PrivatePerson::Permission } it { should include following_users_permission } it { should include public_permission } end context 'when follower' do subject { follower_user.permissions_by(followed_user) } it { should be_an ActiveRecord::Relation } - its(:first) { should be_a Permission } + its(:first) { should be_a PrivatePerson::Permission } it { should include user_followers_permission } end context 'when following_of_followings' do subject { following_of_following_user.permissions_by(followed_user) } it { should be_an ActiveRecord::Relation } - its(:first) { should be_a Permission } + its(:first) { should be_a PrivatePerson::Permission } it { should include following_of_followings_permission } end context 'when follower_of_follower' do subject { follower_of_follower_user.permissions_by(followed_user) } it { should be_an ActiveRecord::Relation } - its(:first) { should be_a Permission } + its(:first) { should be_a PrivatePerson::Permission } it { should include follower_of_followers_permission } end end describe '#is_permitted?' do include_context 'permissions support' @@ -99,10 +99,10 @@ end end end end - describe PrivatePerson::Permissor do + describe 'acts_as_permissor' do include_context 'users support' include_context 'permissor support' context 'Instance Methods' do describe '#permits' do