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

Feature: rspec-like syntax for stubbing and mocking #22

Open
bennyhat opened this issue Aug 24, 2016 · 0 comments
Open

Feature: rspec-like syntax for stubbing and mocking #22

bennyhat opened this issue Aug 24, 2016 · 0 comments

Comments

@bennyhat
Copy link
Collaborator

bennyhat commented Aug 24, 2016

To make this slightly more accessible to people familiar with rspec, it would be great if the output and exit code stubs/mocks were moved to (or supplemented with) an rspec style.

Current way to mock

stubbed_curl_command.with_args('-XGET','google.com').outputs('<html>go away</html>')

RSpec way to mock

allow(stubbed_curl_command).to receive(:call).with('-XGET','google.com').and_return('<html>go away</html>')
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

1 participant