Read "RailsApps Tutorials:  Devise with RSpec and Cucumber"