How To: request or feature test with Rails 3 (and rspec) for signup - heartcombo/devise GitHub Wiki
### Test for creating an account
require 'spec_helper'
describe "Spec for Sign Up" do
it "should create new user account" do
visit new_user_registration_path
email = "[email protected]"
fill_in 'user_email', :with => email
fill_in 'user_password', :with => "password"
fill_in 'user_password_confirmation', :with => "password"
click_button 'Sign up'
expect(page).to have_content "Welcome! You have signed up successfully."
end
end