Skip to content

Instantly share code, notes, and snippets.

@yukas
Created May 18, 2016 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukas/782d388218a4981a6522fd717a19c4b1 to your computer and use it in GitHub Desktop.
Save yukas/782d388218a4981a6522fd717a19c4b1 to your computer and use it in GitHub Desktop.
Bare feature spec
require "spec_helper"
feature "Authentication" do
before do
Traver.create(user: { email: "walter@white.com", password: "walter" })
end
scenario "User logs in successfully by entering email and password" do
visit login_path
within("#login-form") do
fill_in "email", with: "walter@white.com"
fill_in "password", with: "walter"
click_button "Login"
end
expect(page).to have_content "Successfully logged in."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment