Sha256: cd3d8e8e732034ece6c1510b29bc0e504c4cc7c22430eb3d09cb8be3cfa452b8

Contents?: true

Size: 420 Bytes

Versions: 18

Compression:

Stored size: 420 Bytes

Contents

module ApplicationHelpers
  def login_view_as(role=:user)
    user = Factory(role)
    fill_in 'user_email', :with => user.email
    fill_in 'user_password', :with => user.password
    click_button 'Login'
  end
  def login_controller_as(role=:user)
    user = Factory(role)
    #user.confirm! # or set a confirmed_at inside the factory. Only necessary if you are using the confirmable module
    sign_in user
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
active_leonardo-0.9.0 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.8.1 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.8.0 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.7.0 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.6.1 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.6.0 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.5.3 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.5.2 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.5.1 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.5.0 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.4.1 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.2.3 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.2.2 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.2.1 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.1.0 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.0.7 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.0.6 lib/generators/leolay/templates/spec/helpers/application_helpers.rb
active_leonardo-0.0.6.beta2 lib/generators/leolay/templates/spec/helpers/application_helpers.rb