Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Feature: orchestration of method chains #1

Open
onyxrev opened this issue Jul 7, 2016 · 0 comments
Open

Feature: orchestration of method chains #1

onyxrev opened this issue Jul 7, 2016 · 0 comments

Comments

@onyxrev
Copy link
Contributor

onyxrev commented Jul 7, 2016

Currently you can orchestrate the top-level call with default scenarios underneath:

API::FakeAccountsClient::V2.class_call(:oauth_access_tokens).yields(:success)

API::FakeAccountsClient::V2.oauth_access_tokens.create
success!

But that would also make the following succeed:

API::FakeAccountsClient::V2.class_call(:oauth_access_tokens).yields(:success)

API::FakeAccountsClient::V2.oauth_access_tokens.destroy
success!

... which may not provide sufficiently fine-grained control.

I'd like to be able to do something like:

API::FakeAccountsClient::V2.class_call(:oauth_access_tokens, :create).yields(:success)

Or maybe even:

API::FakeAccountsClient::V2.class_call(:oauth_access_tokens, :create).yields(:success, :failure)

You get the idea. The syntax is up for discussion.

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

No branches or pull requests

1 participant