Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Created June 16, 2011 12:24
Show Gist options
  • Save dchelimsky/1029128 to your computer and use it in GitHub Desktop.
Save dchelimsky/1029128 to your computer and use it in GitHub Desktop.
service = flexmock()
client = Client.new(service)
service.should_receive(:expensive_method).once.and_return('some data')
client.method_that_invokes_expensive_method_on_service
client.method_that_invokes_expensive_method_on_service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment