Skip to content

Instantly share code, notes, and snippets.

@workmad3
Forked from tbbooher/gist:976435
Created May 17, 2011 13:17
Show Gist options
  • Save workmad3/976443 to your computer and use it in GitHub Desktop.
Save workmad3/976443 to your computer and use it in GitHub Desktop.
rspec test
require 'spec_helper'
describe RegistrationsController do
include Devise::TestHelpers
let :user do
mock_model(User)
end
before (:each) do
controller.stub!(:current_user).and_return(user)
end
context "User can update their account details" do
it "should find the current user"
it "should update the user details"
it "should set the flash message"
it "should redirect the user to their account page"
it "should not allow the user to update another user"
it "should inform the user of an error if saving failed"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment