Suppose, I have a request to google.com. I can record a cassette and use. But imagine situation when I need to test suite when google.com returns a 500 error code? How could it be done? I thought about manual change of the cassette file, but when I need to re-record all the cassettes I will need to change this cassette also and this does not suit my need 'cause I have lots of such cases
Or are there any alternatives to vcr which let do so?
When you need a response that is not easily recordable, VCR is not the right tool. I recommend you use WebMock or the stubbing facilitates built-in to your HTTP library. (Excon, Faraday and Typhoeus all have built-in stubbing APIs).