Check out example codes for "webmock stub_request not working". It will help you in understanding the concepts better.

Code Example 1

# If in Rails, make sure you don't have VCR AND Webmock installed.
# if you do, you'll need to comment out VCR, let webmock do it's thing 
# at lesat once, then you can use VCR

Learn ReactJs, React Native from