The scenario is as follows. My Order model has an after_create that contacts a remote payment gateway to retrieve a payment URL. In my Cucumber tests I don't want to perform this action, but return an arbitrary URL. My current cucumber tests looks like this:
Given there is a product "Product X" When I enter my credentials And I click "Order Now" Then I should be redirected to "arbitrary url"
The problem is where/how do I make sure that my order model sets the url correctly and does not contact the remote payment gateway?