Skip to content

Contract Result matchers #21

@rkolesnev-vineti

Description

@rkolesnev-vineti

Expand match_ok and match_err to optionally receive a contract as the second argument:

result = some_method

case result
when match_ok(:ok, Contract) then 'has status :ok and underlying data matches Contract'
when match_ok(:ok) then 'other results with status :ok'
when match_ok then 'successful results with status different to :ok'
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions