Sha256: 4c367a979140ce3523e26285e7868a598f46dfa6bdc3720ec22328c4479fa2a4
Contents?: true
Size: 742 Bytes
Versions: 2
Compression:
Stored size: 742 Bytes
Contents
require 'spec_helper' require 'fixtures/models' require 'helpers/current_users' class Context include CanTango::Api::Scope::User include_and_extend ::CurrentUsers end class User cantango end class Admin tango_user :masquerade end describe CanTango::Api::Scope::User do subject { Context.new } before do subject.current_admin.masquerade_as subject.current_user end describe 'scope_user(scope, options)' do specify do subject.scope_user :user do |user| user.subject.should == subject.current_user end end end describe 'real_user(scope, options)' do specify do subject.real_user :user do |user| user.subject.should == subject.current_user end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cantango-api-0.1.3 | spec/cantango/api/scope/user_spec.rb |
cantango-api-0.1.2 | spec/cantango/api/scope/user_spec.rb |