Created
February 13, 2013 19:07
-
-
Save IanWhitney/4947193 to your computer and use it in GitHub Desktop.
Stubbing a controller method. I had to do this to test an API controller that required authorization.
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
| def setup | |
| @controller.stubs(:token_valid?).returns(true) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment