Skip to content

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

@bennyhat

Description

@bennyhat

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>')

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions