I'm currently using RSpec2, Cucumber and VCR (via WebMock), and everything's working great.
With VCR normally all requests are recorded and then replayed against the recorded cassettes.
Now I want to allow real web requests in some scenarios:
@live
. For these tests – and these tests only – I'd like to allow real web requests.You can do this with cucumber's Before
and After
hooks. Just disable VCR using something like this:
Before('@live') do
VCR.eject_cassette
VCR.turn_off!
end
This may be dependent on exactly how you are integrating VCR with your cucumber tests though.