Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (23 sloc) 0.699 kb
#
# Usage:
#
# class MyFeature < Spinach::FeatureSteps
# include Spinach::CurrentUser
# end
#
module Spinach
module CurrentUser
include Spinach::DSL
def current_user
# Fabrication
# @current_user ||= Fabricate(:user, password: 'test1234', password_confirmation: 'test1234')
# Factory Girl
# @current_user ||= FactoryGirl.create(:user, password: 'test1234', password_confirmation: 'test1234')
end
step 'I am logged in' do
login_as current_user
# Use this if you're using capybara-webkit and issues with login in
# login_as(current_user, scope: :user, run_callbacks: false)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.