I'm trying to test an active record object destroy failure but I'm having problems creating a failure situation. I have a before_filter method called 'require_user_payment_info' which validates the @payment_info object before the delete method is called so I can't create a 'bad' @payment_info object before the delete method is called.
Here's the require_user_payment_info method:
And the actual delete method:
posted 6 years ago
Bingo - here's my solution:
Thanks for your help!
Hang a left on main. Then read this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book