I
I
IvanN7772016-07-27 21:19:46
Ruby on Rails
IvanN777, 2016-07-27 21:19:46

Which gem to choose for rails api testing?

I heard about rspec, and I even know it basicly.
Once I failed an interview with the task:
How to test a paid api without referring to it.
I wonder what he meant.
In general, it’s interesting just to understand what basic points need to be taken into account or pleasantly applied? when testing

Answer the question

In order to leave comments, you need to log in

1 answer(s)
@
@mgyk, 2016-07-27
@IvanN777

https://github.com/vcr/vcr
You can do this. The idea is that you write the API response once and then you can put it as many times as you like in the tests and update the responses if necessary.
In order not to use the API at all, you can simply emulate all the API responses inside the spec https://robots.thoughtbot.com/how-to-stub-external...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question