Sha256: 9a844c46e781e1267970840524ddd8057012e02cffea54ea6d27d5d474017496

Contents?: true

Size: 528 Bytes

Versions: 2

Compression:

Stored size: 528 Bytes

Contents

shared_examples_for "a provider" do
  let(:user) { stub(:user) }

  it "can log a user in" do
    provider.login(user)

    provider.current_user.should == user
  end

  it "can log a user out" do
    provider.login(user)

    provider.logout

    provider.current_user.should == nil
  end

  it "responds to login_exclusive" do
    provider.should respond_to(:login_exclusive)
  end

  it "knows if there are any users logged in" do
    provider.login(user)

    provider.current_users_without_scope.should == [user]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
switch_user-0.9.1 spec/support/provider.rb
switch_user-0.9.0 spec/support/provider.rb