venmo / DVR

Network testing for Swift
http://blog.soff.es/network-testing-in-swift-with-dvr
MIT License
651 stars 86 forks source link

Cassette doesn't exist, but library reports the request is not found #32

Open eimantas opened 8 years ago

eimantas commented 8 years ago

I intentionally changed the cassette name when initialising a session, however the test fails with fatalError() call from DVR stating that the request was not found. I am certain the json file is not there and have performed the clean build/test and even removal of DerivedData folder.

soffes commented 8 years ago

You might have an old version. We don't call fatalError any more. You might also check the copy resource phase of your test target.

eimantas commented 8 years ago

I did and it's not there. I can still reproduce the issue with 0.1.4 release.

eimantas commented 8 years ago

FWIW - the code now stops at this abort() call:

// Cassette is missing. Record.
if session.recordingEnabled == false {
    print("[DVR] Recording is disabled.")
    abort()
}

I see the documentation is a bit outdated as there is no more beginRecording() and endRecording() methods. Only recordingEnabled property. But even setting this property to true after initialising a session the test crahes on the aforementioned line.