Sha256: c761f80c05a6ea6acda8c712a5586032421bddeaeb39ca637ff548b107124777

Contents?: true

Size: 386 Bytes

Versions: 4

Compression:

Stored size: 386 Bytes

Contents

def login_as(login)
  if login.blank?
    logout
  else
    @user = User.find(ActiveRecord::FixtureSet.identify(login))
    post browser_session_path, login_as: @user.login
  end
end

def logout
  @user = nil
  delete sign_out_path
  session[:user].should == nil
end

Given /^I am logged in as "([^\"]*)"$/ do |login|
  login_as(login)
end

Given /^I am not logged in$/ do
  logout
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
open_conference_ware-1.0.0.pre4 features/step_definitions/authentication_steps.rb
open_conference_ware-1.0.0.pre3 features/step_definitions/authentication_steps.rb
open_conference_ware-1.0.0.pre2 features/step_definitions/authentication_steps.rb
open_conference_ware-1.0.0.pre1 features/step_definitions/authentication_steps.rb