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

better API to defining doubles. #5

Open
moro opened this issue Jan 17, 2010 · 2 comments
Open

better API to defining doubles. #5

moro opened this issue Jan 17, 2010 · 2 comments

Comments

@moro
Copy link
Owner

moro commented Jan 17, 2010

Sinatra like

inside initializer block. (in Ww::Server.build_double)
get(path, :double => :spy) do .. end

outside
Ww::Server[:server].get(path, :double => :spy) do .. end

rr like (?)

inside initializer block (in Ww::Server.build_double)
spy(self).get(path) do .. end
spy!.get(path) do .. end

outside
spy(Ww::Server[:server]).get(path) do .. end

current

inside initializer block (in Ww::Server.build_double)
spy(:get, path) do .. end

outside
Ww::Server[:server].spy(:get, path) do .. end

@moro
Copy link
Owner Author

moro commented Jan 18, 2010

I'm waiting YOUR idea. Feel easy to comment, please.

@moro
Copy link
Owner Author

moro commented Jan 19, 2010

how do you think of

spy.get(:get, path) do .. end

spy() returns Proxy object to define spy(or other double) actions.

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

No branches or pull requests

1 participant