Skip to content

Instantly share code, notes, and snippets.

@tbbooher
Created May 17, 2011 13:11
Show Gist options
  • Save tbbooher/976435 to your computer and use it in GitHub Desktop.
Save tbbooher/976435 to your computer and use it in GitHub Desktop.
rspec test
require 'spec_helper'
describe RegistrationsController do
include Devise::TestHelpers
before (:each) do
@user = Factory.create(:user)
@request.env['devise.mapping'] = :user
@user.confirm!
sign_in @user
end
context "User can update their account details" do
describe "the user should be able to edit their profile" do
it "should let them change their first name" do
# load the form (/users/edit)
# change a field (first_name = "Bill")
# submit
# @user.first_name.should eq("Bill")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment