Skip to content

Instantly share code, notes, and snippets.

@denysonique
Created July 27, 2011 20:10
Show Gist options
  • Save denysonique/1110256 to your computer and use it in GitHub Desktop.
Save denysonique/1110256 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe 'Signed in' do
before(:each) do
user = Factory(:user)
visit new_user_session_path
fill_in 'Email', with: user.email
fill_in 'Password', with: user.password
click_button 'Sign in'
end
after(:each) do
User.delete_all
end
it "user should sign in successfully" do
current_path.should eq('/profile')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment