Update capybara to last version
This commit is contained in:
24
spec/features/user_sign_up_spec.rb
Normal file
24
spec/features/user_sign_up_spec.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'User sign up' do
|
||||
let(:user) { FactoryGirl.build(:user) }
|
||||
|
||||
background do
|
||||
visit new_user_path
|
||||
fill_in 'Email', :with => user.email
|
||||
fill_in 'Password', :with => user.password
|
||||
fill_in 'Password confirmation', :with => user.password
|
||||
end
|
||||
|
||||
scenario 'creates the user' do
|
||||
expect {
|
||||
click_button 'Sign up'
|
||||
}.to change(User, :count).by(1)
|
||||
end
|
||||
|
||||
scenario 'redirects to the home page' do
|
||||
click_button 'Sign up'
|
||||
|
||||
current_path.should == root_path
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user