Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Features
Add an
ignoring_check_for_db_indexqualifier to thehave_secure_tokenmatcher, since
has_secure_tokenencourages use of an index but does notenforce it. (#1278)
Add
allow_blanktovalidate_length_ofto match other validation matchers.(#725, #1318)
Add new matcher
have_implicit_order_columnwhich can be used to test theimplicit_order_columnsetting for ActiveRecord models under Rails 6+.(#1243)
Add a new
is_other_thanqualifier tovalidate_numericality_ofto be ableto test the numericality validation's
:other_thanoption. (#1282)Add a new
have_one_attachedandhave_many_attachedmatchers for testingthe new model-level ActiveStorage macros in Rails 6. (#1102)
Bug fixes
Fix performance of
allow_valueso that it doesn't hang if the given value isreally long. (#1290)
Fix
have_manyso that it is possible to test an association that has a scopethat takes an argument. (#952, #992)
Update
validate_uniqueness_ofto use the publicvalidators_oninstead ofthe private
_validatorswhen reading validations off of a model. Thisenables shoulda-matchers to be used with the schema_validations gem.
(#995)
Update
validate_uniqueness_ofto work with scopes that aretimecolumns.(#1190)
Fix
have_and_belong_to_manyso that when using thejoin_tablequalifieryou can pass a symbol rather than a string. (#1323)
Improvements
Update
have_manywhen used against a:throughassociation so that it failsif the inverse model does not have a
belongs_toassociation. (#646,#723, c0a1578)
Add Ruby 2.7 to test matrix and default development Ruby. (#1310)
Remove warnings emitted on Ruby 2.7 in
word_wrap. (#1314)Remove warnings emitted on Ruby 2.7 in Doublespeak. (#1328)
Clean up requires within the code by converting them to
autoloads. (#1320)