Created
October 9, 2012 15:18
-
-
Save simongregory/3859469 to your computer and use it in GitHub Desktop.
yielding a mock to a block
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
should "configure the Application with a consumer key and secret" do | |
credentials = {'consumer_key' => 'skeleton', 'consumer_secret' => 'closet'} | |
config = mock() | |
config.expects(:consumer_key=).with('skeleton').once | |
config.expects(:consumer_secret=).with('closet').once | |
service = mock() | |
service.stubs(:configure).yields(config) | |
Blah.store_consumer(credentials, service) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment