Sha256: fbca69ce430fd2eacf39dfbe0b72469069c6e2e48cdc2227ce5c43befc354018

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

def login
  activate_authlogic
  @current_user = User.create({ :name => Faker::Name.name,
                                :email => Faker::Internet.email,
                                :password => 'testing',
                                :password_confirmation => "testing" })
  @current_user
  @current_user.roles << Role.create(:name => 'admin')

  UserSession.create!(@current_user)
  controller.stub!(:current_user).and_return(@current_user)
  ApplicationController.send(:public, :current_user)
  view.stub!(:current_user).and_return(@current_user) if respond_to?(:view)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
double_auth_engine-0.0.5 spec/support/user_authentication.rb
double_auth_engine-0.0.4 spec/support/user_authentication.rb
double_auth_engine-0.0.2 spec/support/user_authentication.rb
double_auth_engine-0.0.1 spec/support/user_authentication.rb