Mocking Third Party API’s

Everyone uses third party APIs in their project. These are the external services which allows you to access third party functionalities within the project without rebuilding them. While writing test cases for any project it is very difficult to be sure that the test suites always run successfully as it is dependent on the third … Continue reading Mocking Third Party API’s

Payment Gateway testing using webmock

Testing the payment gateway involves lots of scenarios like what should happen if exception is raised while doing payment. To test this scenario we have to call payment gateway API and take response. But herein lies a problem. The test code you have written may work sometime and won't work another time. The reason behind … Continue reading Payment Gateway testing using webmock

Stubbing Geo-location requests using webmock

Geo-location integration is common today for every web application. We have gems on hand, to integrate Geo-location to our application. With few steps of configuration we can Geo-code our attributes ie., user addresses. But testing Geo-coding integration takes much more time than development! We currently use Google Map APIs for our work. If there are … Continue reading Stubbing Geo-location requests using webmock