Last active
October 3, 2016 17:59
-
-
Save thiagoa/dce9071acd8a30796ade5da3eae305de to your computer and use it in GitHub Desktop.
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 stub_timeline(id:, returns:) | |
instance = instance_double(TwitterTimelineHub) | |
allow(instance).to receive(:call).with(id).once.and_return(returns) | |
allow(TwitterTimelineHub).to receive(:new).once.and_return(instance) | |
end | |
def stub_result(**attrs) | |
instance_double(TwitterTimelineHub::Result, **attrs) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment