Closed czechboy0 closed 8 years ago
Been thinking about this a lot too since first writing all of this. I was thinking it could work like UITableView stuff. So you can call insertRow...
by itself to just insert one animated or you can use beginEditing
& endEditing
to group them together. This way, we don't break the current API and you can do multiple. Thoughts? cc @ayanonagon @hyperspacemark
I def like the idea of not breaking the current API and modeling it after something that is familiar to most Cocoa developers (like UITableView
). :octocat:
It looks like we will always need two variables/calls. In my suggestion above, it was recordMultiple
and finishRecording()
, in your case it could be startBatchRecording
and endBatchRecording
. I probably like your solution better, though. :+1:
Since
Cassette
saves an array ofInteraction
s, instead of just one, it would be great to add support for recording and replaying multiple interactions in one test case.Possible changes for recording:
Session
calledrecordMultiple
, which would allow for not stopping after the firstInteraction
has been recordedSession
calledfinishRecording()
, which persists allInteraction
s from memory to disk and asserts to present the file path, like it does now.finishRecording()
would only have to be called ifrecordMultiple
is set totrue
finishRecording()
fromdeinit
ofSession
, so that user doesn't have to call it manuallyPossible changes for replaying:
Interaction
should be played next, automatically increment after each replaydeinit
that exactly the number of prerecordedInteraction
s has been called (fail the test if more or less network calls were made)???
Profit.