Sha256: b221ca28c14bc078a6e816ff644255e1f50a15bd1310e37226141f3f8152e0ef

Contents?: true

Size: 704 Bytes

Versions: 1

Compression:

Stored size: 704 Bytes

Contents

require 'spec_helper'

describe ElabsMatchers::Helpers::Session do
  let(:user) { "I'm a user record" }

  describe "#sign_in_as" do
    it "set $signed_in to true" do
      sign_in_as
      $signed_in.should be_true
    end

    it "uses sign_in as an alias" do
      sign_in
      $signed_in.should be_true
    end

    it "set current user to the given argument if any" do
      sign_in_as(user)
      current_user.should == user
    end

    it "set's the current user to nil if none given" do
      sign_in_as
      current_user.should be_nil
    end
  end

  describe "#sign_out" do
    it "sets $signed_in to nil" do
      sign_in
      sign_out
      $signed_in.should be_false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elabs_matchers-0.0.3 spec/elabs_matchers/helpers/session_spec.rb