Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How to stub a HTTParty request called inside a function to respond with error code?

My method makes a HTTParty get request depending on parameters. The method handles response and raises custom error messages on basis of the response. I am using minitest to test this functionality. I do not want to make actual calls during the test. How can I stub the HTTParty get request inside the method with params?

Comments