Sha256: 632bcbd539f71ad6fbde9d03578bea4ddf7655bca4e601e47c90e434be080ea1

Contents?: true

Size: 423 Bytes

Versions: 5

Compression:

Stored size: 423 Bytes

Contents

module FeatureHelpers

  def sign_in_as(user, options = {})
    if options[:ui].present?
      visit root_path
      sign_out(:ui => true)
      fill_in 'Email', with: user.email
      fill_in 'Password', with: user.password
      click_button 'Sign In'
    else
      login_as(user, :scope => :user)
    end
  end

  def sign_out(options = {})
    options[:ui].present? ? click_link('Sign Out') : logout(:user)
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
notify_on-1.0.5 spec/support/feature_helpers.rb
notify_on-1.0.4 spec/support/feature_helpers.rb
notify_on-1.0.3 spec/support/feature_helpers.rb
notify_on-1.0.2 spec/support/feature_helpers.rb
notify_on-1.0.1 spec/support/feature_helpers.rb