Skip to content
This repository

Hit the same URL several times and get two different responses #78

egorpe opened this Issue February 26, 2013 · 3 comments

2 participants

Egor Pervuninski Rob Fletcher
Egor Pervuninski

Currently Betamax is returning the first interaction repeatedly and doesn't record the next one. If you record it in other test case and append to the tape, Betamax still only returns the first interaction only.

If you read here!topic/vcr-ruby/yl6K7Vt8eiA Ruby's VCR does support it.

"If one test hits the same URL multiple times and expects different responses, that's fine, too--VCR will sequence the responses and return them in the same order they were recorded" -- Myron Marston

The case for this could be something like this:
1) Check if there's no file in Amazon S3 bucket (GET request)
2) Upload a new file
3) Check that file is in the bucket (same GET request as in 1)

Rob Fletcher

Have you tried using the WRITE_SEQUENTIAL and READ_SEQUENTIAL tape modes? Sounds like exactly the use-case they are designed for. Have a look at the Tape Modes section of the documentation.

Egor Pervuninski

Looks like I forgot to set a mode...

Rob Fletcher

Ok, I'll go ahead & close this

Rob Fletcher robfletcher closed this February 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.