Organize feature specs in sub directories

This commit is contained in:
Thibault Jouan
2015-05-01 11:18:41 +00:00
parent 10d4da2822
commit 737c6b03e4
5 changed files with 16 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
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'
expect(current_path).to eq root_path
end
end