Skip to content

Easy matchers provides RSpec matchers for common Rails functionality

License

Notifications You must be signed in to change notification settings

MLSDev/easy-matchers

Repository files navigation

DEPRECATED! ⛔️

This repo is deprecated and no longer supported.


Easy Matchers

Gem Version Code Climate Test Coverage Build Status

Easy matchers provides RSpec matchers for common Rails functionality.


Why

  1. We want write specs all functionality in our Rails application. Yes, with validations, associations and all other things.

  2. We want check presence of validations and associations, but don't test implementations. This is main difference with shoulda-matchers. Shoulda-matchers instead checking the presence of validations or associations, check implementation. Why we should test rails?

ActiveModel::Validations matchers

  • validate_absence_of
  • validate_acceptance_of
  • validate_confirmation_of
  • validate_length_of
  • validate_numericality_of
  • validate_presence_of

Install and configure

gem install easy-matchers

or via bundler:

gem 'easy-matchers'

spec/support/easy-matchers.rb:

RSpec.configure do |config|
  config.include Easy::Matchers::Validations, type: :model
end

Examples

License

This work is licensed under a MIT License.

About MLSDev

MLSDev.com

Easy-Matcher are maintained by MLSDev, Inc. We specialize in providing all-in-one solution in mobile and web development. Our team follows Lean principles and works according to agile methodologies to deliver the best results reducing the budget for development and its timeline.

Find out more here and don't hesitate to contact us!

Bitdeli Badge

About

Easy matchers provides RSpec matchers for common Rails functionality

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages