Created
June 29, 2011 14:47
-
-
Save neilmiddleton/1053981 to your computer and use it in GitHub Desktop.
Failing RSpec test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AboutYou.any_instance.stub!(:save).and_return(false) | |
post :create | |
assigns[:about_you].should be_new_record | |
flash[:notice].should be_nil | |
response.should render_template('new') | |
def create | |
@about_you = current_user.build_about_you(params[:about_you]) | |
if @about_you.save | |
flash[:notice] = "Your details have been saved" | |
redirect_to cashflow_path | |
else | |
render :new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment