How do I claim that an HTTP request is being executed with the correct URI when using a VCR and WebMock?

I am testing a Ruby on Rails project using WebMock and a VCR. I would like to claim that the request is made to the correct host, but I can not find an example of how to do this. Here is some kind of pseudo code for what I'm trying to do:

VCR.use_cassette('example.com request') do
  subject.domain = 'example.com'
  expect { subject.get('/something') }.to make_a_get_request_for('http://example.com/something')
end
+4
source share

Source: https://habr.com/ru/post/1527383/


All Articles