Matchi::Fix

Version Yard documentation CI RuboCop License

A Fix specing matcher compatible with Matchi.

Installation

Add this line to your application's Gemfile:

gem "matchi-fix"

And then execute:

bundle

Or install it yourself as:

gem install matchi-fix

Usage

To make Matchi::Fix available:

require "matchi/fix"

All examples here assume that this has been done.

With a block of specifications

matcher = Matchi::Fix.new { it MUST be 42 }

matcher.expected        # => #<Fix::Set:0x00007fd96915dc28 ...>
matcher.matches? { 42 } # => true

With the constant name of the specifications

If specifications have been defined and named, they can be mentioned:

Fix :Answer do
  it MUST be 42
end

matcher = Matchi::Fix.new(:Answer)

matcher.expected        # => #<Fix::Set:0x00007fd96915dc28 ...>
matcher.matches? { 42 } # => true

Contact

Versioning

Matchi::Fix follows Semantic Versioning 2.0.

License

The gem is available as open source under the terms of the MIT License.


This project is sponsored by:
Sashite