Sha256: c02be8990cdd5d3a6d2a1a25cc299a8af2ac5ddf027679350563ab3bee906eba
Contents?: true
Size: 740 Bytes
Versions: 2
Compression:
Stored size: 740 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 AdminUser cantango end describe CanTango::Api::Scope::User do subject { Context.new } before do subject.current_user.active_account = subject.current_admin end describe 'scope_user(scope, options)' do specify do subject.scope_user :user do |user| user.candidate.should == subject.current_admin end end end describe 'real_user(scope, options)' do specify do subject.real_user :user do |user| user.candidate.should == subject.current_user end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cantango-api-0.1.1 | spec/cantango/api/scope/user_spec.rb |
cantango-api-0.1.0 | spec/cantango/api/scope/user_spec.rb |