nobrainer-rspec
The nobrainer-rspec library provides a collection of RSpec-compatible matchers that help to test NoBrainer documents.
This gem is heavily inspiring from the mongoid-rspec gem, keeping same API so that migrating from one to the other is easy.
Installation
Drop this line into your Gemfile:
group :test do
gem 'nobrainer-rspec'
end
Configuration
Add to your rails_helper.rb
or spec_helper.rb
file.
require 'nobrainer-rspec'
RSpec.configure do |config|
config.include NoBrainer::Matchers
end
Matchers
Associations
Validations
- validate_acceptance_of
- validate_confirmation_of
- validate_exclusion_of
- validate_format_of
- validate_inclusion_of
- validate_length_of
- validate_numericality_of
- validate_presence_of
- validate_uniqueness_of
Contributing
You're encouraged to contribute to this library.
Copyright and License
Copyright (c) 2020 Guillaume Hain and Contributors.
MIT License. See LICENSE for details.