GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - where/minitest-matcher-library

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
Gemfile
Gemfile
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
minitest-matcher-library.gemspec
minitest-matcher-library.gemspec
 
 

Repository files navigation

Minitest Matcher Library

The goal is to be a series of matchers, that bring minitest-matchers into a state where it is as useful as shoulda-matchers, instead of having to build own matchers custom.

For simple validations see valid_attribute.

Installation

  • Add to your Gemfile
  • Include the helpers in your TestCase class, like below:
class ActiveSupport::TestCase
  include MinitestMatcherLibrary::TestHelpers
end

Usage

Date Validations:

Assert that only valid dates passed are accepted.

object = Object.new
assert_must validate_datetime(:start_date), object

Relationships

Assert that the relationship for the given class is setup.

assert_must belong_to(:yolo), Swag
assert_must have_many(:fomos), Swag
assert_must have_one(:yolo), Swag
assert_must have_and_belong_to_many(:yolos), Swag

This gem is very much a work in progress. Needs major cleanup, and tests. Also feel free to add additional useful matchers into this library that help you in your project.

About

No description, website, or topics provided.

Resources

Readme
Activity
Custom properties

Stars

3 stars

Watchers

24 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.