Skip to content

Instantly share code, notes, and snippets.

@joshsmith
Created October 25, 2012 00:14
Show Gist options
  • Select an option

  • Save joshsmith/3949754 to your computer and use it in GitHub Desktop.

Select an option

Save joshsmith/3949754 to your computer and use it in GitHub Desktop.
require 'spec_helper'
feature 'Signing in' do
before do
create(:user)
visit '/signin'
end
scenario 'Successful sign in' do
fill_in "Login", :with => "[email protected]"
fill_in "Password", :with => "password"
click_button "Sign in"
page.should have_content("Signed in successfully.")
end
end
FactoryGirl.define do
factory :user do
email "[email protected]"
username "testuser"
name "Test User"
password "password"
password_confirmation "password"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment