-
-
Save ilpoldo/723630 to your computer and use it in GitHub Desktop.
This file contains 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
@invalid_user = Factory.create(:user) | |
@invalid_user.stub(:valid?).and_return(false) | |
User.stub(:new).and_return(@invaild_user) | |
post :create, :user_name => "some user name that won't even be used" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/723630/5906238dfb0c973a89fc15727eab0dddfe40a21a#LID4
I did miss it completely: you will not be able to pass a whole ruby object through the post parameters I think.
My guess is that somewhere in the way the mock request is processed that thing will be smashed.