Created
August 9, 2013 19:48
-
-
Save ddelponte/6196614 to your computer and use it in GitHub Desktop.
How to mockout a service depended on by a controller. For more info, please see: http://refaktor.blogspot.com/2012/08/how-to-use-mocks-in-controller-tests.html
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
TwitterReaderService twitterReaderServiceMock = Mock(TwitterReaderService) | |
def setup() { | |
controller.twitterReaderService = twitterReaderServiceMock | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment