{"id":21502411,"url":"https://github.com/fixrb/matchi-fix","last_synced_at":"2026-03-16T08:03:16.416Z","repository":{"id":56882943,"uuid":"42023523","full_name":"fixrb/matchi-fix","owner":"fixrb","description":"A Fix expectation matcher compatible with Matchi.","archived":false,"fork":false,"pushed_at":"2024-05-16T19:01:03.000Z","size":56,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-10T09:14:34.163Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fixrb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-07T00:25:35.000Z","updated_at":"2021-07-31T21:01:56.000Z","dependencies_parsed_at":"2022-08-20T13:10:42.002Z","dependency_job_id":null,"html_url":"https://github.com/fixrb/matchi-fix","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixrb%2Fmatchi-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixrb%2Fmatchi-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixrb%2Fmatchi-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixrb%2Fmatchi-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fixrb","download_url":"https://codeload.github.com/fixrb/matchi-fix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226077479,"owners_count":17570164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby"],"created_at":"2024-11-23T18:14:50.956Z","updated_at":"2026-03-16T08:03:16.349Z","avatar_url":"https://github.com/fixrb.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matchi::Fix\n\n[![Version](https://img.shields.io/github/v/tag/fixrb/matchi-fix?label=Version\u0026logo=github)](https://github.com/fixrb/matchi-fix/releases)\n[![Yard documentation](https://img.shields.io/badge/Yard-documentation-blue.svg?logo=github)](https://rubydoc.info/github/fixrb/matchi-fix/main)\n[![License](https://img.shields.io/github/license/fixrb/matchi-fix?label=License\u0026logo=github)](https://github.com/fixrb/matchi-fix/raw/main/LICENSE.md)\n\n[Matchi](https://github.com/fixrb/matchi)-compatible matcher for testing implementations against [Fix](https://github.com/fixrb/fix) specifications.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"matchi-fix\"\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\nOr install it yourself:\n\n```shell\ngem install matchi-fix\n```\n\n## Description\n\nA Matchi-compatible matcher that allows testing objects against Fix specifications.\nEnables verification of implementation conformance to Fix test specifications\nacross different testing frameworks like Minitest and RSpec. Integrates seamlessly\nwith the Fix testing framework's powerful specification system while maintaining\nMatchi's clean matcher interface.\n\n## Usage\n\nTo make __Matchi::Fix__ available:\n\n```ruby\nrequire \"matchi/fix\"\n```\n\nThe Fix matcher allows testing values against Fix specifications. After requiring `matchi-fix`, you can use the `Fix` matcher in your tests through anonymous specification:\n\n```ruby\nMatchi::Fix.new { it MUST be 42 }.match? { 42 } # =\u003e true\n```\n\nor through registered specification by name:\n\n```ruby\n# First, define a Fix specification\nFix :Calculator do\n  on(:add, 2, 3) do\n    it MUST eq 5\n  end\n\n  on(:multiply, 2, 3) do\n    it MUST eq 6\n  end\nend\n\n# Then use the matcher to test implementations\ncalculator = MyCalculator.new\n\n# Using direct matcher syntax\nMatchi::Fix.new(:Calculator).matches?(calculator) #=\u003e true/false\n```\n\n### Error Handling\n\nOn missing specifications:\n\n```ruby\nMatchi::Fix.new(:NonExistent)\n# =\u003e KeyError\n```\n\nOn passing both specification name and specification code:\n\n```ruby\nMatchi::Fix.new(:SpecName) { \"Spec block\" }\n# =\u003e ArgumentError\n```\n\n## Contact\n\n* Source code: https://github.com/fixrb/matchi-fix\n\n## Versioning\n\n__Matchi::Fix__ follows [Semantic Versioning 2.0](https://semver.org/).\n\n## License\n\nThe [gem](https://rubygems.org/gems/matchi-fix) is available as open source under the terms of the [MIT License](https://github.com/fixrb/matchi-fix/raw/main/LICENSE.md).\n\n## Sponsors\n\nThis project is sponsored by [Sashité](https://sashite.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixrb%2Fmatchi-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffixrb%2Fmatchi-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixrb%2Fmatchi-fix/lists"}