This repo is deprecated and no longer supported.
Easy matchers provides RSpec matchers for common Rails functionality.
-
We want write specs all functionality in our Rails application. Yes, with validations, associations and all other things.
-
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?
- validate_absence_of
- validate_acceptance_of
- validate_confirmation_of
- validate_length_of
- validate_numericality_of
- validate_presence_of
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
This work is licensed under a MIT License.
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!