Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename start/end recording to begin/finish batch #61

Open
soffes opened this issue Oct 6, 2016 · 2 comments
Open

Rename start/end recording to begin/finish batch #61

soffes opened this issue Oct 6, 2016 · 2 comments

Comments

@soffes
Copy link
Contributor

soffes commented Oct 6, 2016

I was thinking having startRecording/stopRecording in a test is weird since you only record once. Those methods are used for batch requests in one cassette. It would probably be best if these were renamed to beginBatch and finishBatch (or endBatch).

@eliperkins
Copy link
Contributor

Interesting. I wonder if it's worth copying VCR's block-/closure-style usage of cassettes as well, like:

VCR.use_cassette("Things") do
    do_things
end

so maybe something like:

session.record("Things") { session in
    session. dataTaskWithRequest(...)
}

Just kinda brainstorming!

@soffes
Copy link
Contributor Author

soffes commented Oct 10, 2016

Ya I like that approach. I wrote some VCR tests yesterday and really liked that. I'll think on it some more. VCR just replaces system networking with their own for you and we have to DI things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants