Skip to content

Instantly share code, notes, and snippets.

@twinge
Created January 6, 2010 23:07
Show Gist options
  • Save twinge/270784 to your computer and use it in GitHub Desktop.
Save twinge/270784 to your computer and use it in GitHub Desktop.
# above your test
require 'mocha'
# in your test
response = mock
response.stubs(:success?).returns(true)
response.stubs(:authorization).returns(true)
response.stubs(:params).returns({})
ActiveMerchant::Billing::AuthorizeNetGateway.any_instance.stubs(:purchase).returns(response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment