Sha256: abb7baed50491e7715dec9b542f2db3cff7fba7d3e172d8d1383d98b4d0b9e09

Contents?: true

Size: 612 Bytes

Versions: 21

Compression:

Stored size: 612 Bytes

Contents

module AuthMacros

  def log_in(attributes = {})
    @_current_lines_user = FactoryGirl.create(:user, attributes)
    visit lines.login_path
    fill_in "email", with: @_current_lines_user.email
    fill_in "password", with: @_current_lines_user.password
    click_button "Login"
    page.should have_content "Logged in"
  end

  def authorize(attributes = {})
    @current_lines_user = FactoryGirl.create(:user, attributes)
    controller.stub(:current_lines_user).and_return(@current_lines_user)
    controller.stub(:authorize).and_return(true)
  end

  def current_lines_user
    @current_lines_user
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
jeygeethanmedia-inkpen-1.2.6.2 spec/support/auth_macros.rb
jeygeethanmedia-inkpen-1.2.6.1 spec/support/auth_macros.rb
lines-engine-1.2.6.1 spec/support/auth_macros.rb
lines-engine-1.2.6 spec/support/auth_macros.rb
lines-engine-1.2.5 spec/support/auth_macros.rb
lines-engine-1.2.3 spec/support/auth_macros.rb
lines-engine-1.2.2 spec/support/auth_macros.rb
lines-engine-1.2.1.1 spec/support/auth_macros.rb
lines-engine-1.2.1 spec/support/auth_macros.rb
lines-engine-1.2 spec/support/auth_macros.rb
lines-engine-1.1.5.3 spec/support/auth_macros.rb
lines-engine-1.1.5.2 spec/support/auth_macros.rb
lines-engine-1.1.5.1 spec/support/auth_macros.rb
lines-engine-1.1.5 spec/support/auth_macros.rb
lines-engine-1.1.4 spec/support/auth_macros.rb
lines-engine-1.1.3 spec/support/auth_macros.rb
lines-engine-1.1.2 spec/support/auth_macros.rb
lines-engine-1.1.1 spec/support/auth_macros.rb
lines-engine-1.1.0 spec/support/auth_macros.rb
lines-engine-1.0.0 spec/support/auth_macros.rb