Skip to content

Instantly share code, notes, and snippets.

@seban
Created February 21, 2014 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seban/9131807 to your computer and use it in GitHub Desktop.
Save seban/9131807 to your computer and use it in GitHub Desktop.
# controller code
current_merchant.payments.find(params[:id])
# test code
stub(Merchant).find(@merchant_id) { @merchant }
stub(@merchant).payments.stub!.find(@payment.id.to_s) { @payment }
login_merchant(@merchant)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment