0.0
No commit activity in last 3 years
No release in over 3 years
Extra RSpec matches for Rails (ActiveModel::Validators, ActiveModel::Model)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

~> 3.4
 Project Readme

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