Skip to content

Create matches for strout and strerr output #6

@acant

Description

@acant

Write tabular matchers to wrap the rspec output matchers
https://relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/output-matcher

The output matchers are used like this:

specify { expect { subject }.to output('hi').to_stdout }
specify { expect { subject }.to output('hi').to_stderr }

And the tabular wrappers could be written like this:

input              :var1, :var2
output_stdout_with :foo,  :bar,  'foobar'
output_stderr_with :dead, :beef, 'error'

I am not sure if the better form is:

  • output_stdout_with, or
  • stdout_with

Or if these should be both be available and aliased.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions