Recent Releases of https://github.com/thoughtbot/shoulda-matchers
https://github.com/thoughtbot/shoulda-matchers - v7.0.1
7.0.1 - 2025-10-31
Bug fixes
- Hotfix: Add mutex_m gem dependency by @matsales28 and @garrettgregor (#1687)
- Ruby
Published by matsales28 4 months ago
https://github.com/thoughtbot/shoulda-matchers - v7.0.0
7.0.0 - 2025-10-31
Backward-incompatible changes
- Drop support for Rails 6.1 and older by @matsales28 (#1678)
- Drop support for Rails 7.0 by @matsales28 (#1680)
Bug fixes
- Ensure @options is always set in ActiveModel::ValidationMatcher by @yelvert (#1669)
Features
- Add support for Rails 8 by @matsales28 (#1677)
- Add Rails 8.1 support by @matsales28 (#1682)
- Support encrypted ActionText attributes by @spdawson (#1667)
- Add
service,strict_loading, anddependentoptions tohave_attachedmatcher by @matsales28 (#1675)
Improvements
- Refactor Ruby manager setup, add mise integration by @amalrik (#1674)
- Update Ruby versions to latest stable releases by @matsales28 (#1676, #1683)
- Update supported Ruby versions to 3.3.10 and 3.4.7
- Ruby
Published by matsales28 4 months ago
https://github.com/thoughtbot/shoulda-matchers - v6.5.0
What's Changed
- Update CODEOWNERS by @vsppedro in https://github.com/thoughtbot/shoulda-matchers/pull/1648
- docs: add section on testing style that we promote (#1645) by @clemens in https://github.com/thoughtbot/shoulda-matchers/pull/1649
- Matcher delegate_method supports 'private: true' by @pr0d1r2 in https://github.com/thoughtbot/shoulda-matchers/pull/1653
- Documentation Readability Enhancement by @JuzerShakir in https://github.com/thoughtbot/shoulda-matchers/pull/1658
- Automatically Generated: Update Dynamic Section in README by @github-actions in https://github.com/thoughtbot/shoulda-matchers/pull/1660
- Enable sqlite3 2.x+ by @voxik in https://github.com/thoughtbot/shoulda-matchers/pull/1661
- refactor: Use
merge!instead ofmergewhen merging hashes by by @matsales28 in https://github.com/thoughtbot/shoulda-matchers/pull/1650 - Optionally specify alternatives for uniqueness by @lake-effect in https://github.com/thoughtbot/shoulda-matchers/pull/1664
- Fix literal string modification by @asilano in https://github.com/thoughtbot/shoulda-matchers/pull/1665
New Contributors
- @clemens made their first contribution in https://github.com/thoughtbot/shoulda-matchers/pull/1649
- @pr0d1r2 made their first contribution in https://github.com/thoughtbot/shoulda-matchers/pull/1653
- @JuzerShakir made their first contribution in https://github.com/thoughtbot/shoulda-matchers/pull/1658
- @lake-effect made their first contribution in https://github.com/thoughtbot/shoulda-matchers/pull/1664
- @asilano made their first contribution in https://github.com/thoughtbot/shoulda-matchers/pull/1665
Full Changelog: https://github.com/thoughtbot/shoulda-matchers/compare/v6.4.0...v6.5.0
- Ruby
Published by matsales28 10 months ago
https://github.com/thoughtbot/shoulda-matchers - v6.4.0
6.4.0 - 2024-08-16
What's Changed
Features
- Add Rails 7.2 compatibility by @theodorton (#1632)
- Ruby
Published by matsales28 over 1 year ago
https://github.com/thoughtbot/shoulda-matchers - v6.3.1
6.3.1 - 2024-08-13
What's Changed
Bug fixes
- Ensure DefineEnumForMatcher#validating handles Hash enum values correctly by @mi-wada (#1646)
- Ruby
Published by matsales28 over 1 year ago
https://github.com/thoughtbot/shoulda-matchers - v6.3.0
6.3.0 - 2024-08-09
What's Changed
Bug fixes
- Fix uniqueness check for a polymorphic association with STI by @matsales28 (#1624)
Features
- Add
defaultqualifier todefine_enum_formatcher by @matsales28 (#1627) - Add validating qualifier to enum matcher by @matsales28 (#1630)
- Add without_instance_methods qualifier to enum matcher by @vaot (#1636)
Improvements
- Update dependencies of rails-6.1 gemfile by @matsales28 (#1621)
- Update dependencies of rails-7_1 gemfile by @matsales28 (#1619)
- Update dependencies of rails-7.0 gemfile by @matsales28 (#1620)
- Support deprecated status code symbols by @ioquatix (#1637)
- Remove useless
loggerrequire by @Earlopain (#1634)
- Ruby
Published by matsales28 over 1 year ago
https://github.com/thoughtbot/shoulda-matchers - v6.2.0
6.2.0 - 2024-03-15
Bug fixes
- Allow beginless and endless ranges in validates_inclusion_of by @pjpires (#1615)
- Ensure uniqueness validation matcher works with STI by @matsales28 (#1610)
Features
- Add
againstmethod in allow_value matcher by @EduardoSCosta (#1543) - Add support for
strict_loadingoption in association matchers by @rhannequin and @laicuRoot (#1607) - Add
have_delegated_typematcher by @matsales28 (#1606) - Add support for
foreign_typequalifier onAssociationMatcherby @matsales28 (#1609)
Improvements
- Lazy load
ActionControllerandRoutingmatchers forActionController::TestCaseby @ilianah (#1613) - Call dynamic-readme reusable workflow by @stefannibrasil (#1617)
- Update dependencies by @matsales28 (#1611)
- Fix inline documentation for
is_greater_thaninvalidate_comparison_ofmatcher by @jeduardo824 (#1616) - Fix forgotten colon in documentation by @hotoolong (#1612)
- Ruby
Published by matsales28 almost 2 years ago
https://github.com/thoughtbot/shoulda-matchers - v6.1.0
6.1.0 - 2024-01-19
Bug fixes
- Fix negative form of
validate_numericalitymatcher by @matsales28 (#1603)
Features
- Add support for negated matcher on have_secure_password matcher by @amalrik (#1593)
- Add
encryptmatcher to test usage of theencryptsmacro by @theforestvn88 (#1581) - Add
query_constraintsqualifier on the association matchers by @matsales28 (#1604)
Improvements
- Remove
array_column?helper fromValidateAbsenceOfMatcherby @jarenas9539 (#1562) - Bump rubocop version to 1.59.0 by @VSPPedro (#1600)
- Update Ruby version to 3.3.0 by @VSSPedro(#1599)
- Fix
REPRODUCTION_SCRIPT.mdlink returning 404 by @VSPPedro (#1602) - Add support for globally enabled frozen-string-literals by @amalrik (#1598)
- Adjust typos in the documentation by @matsales28 (#1597)
- Ruby
Published by matsales28 about 2 years ago
https://github.com/thoughtbot/shoulda-matchers - v6.0.0
Backward-incompatible changes
- Drop support for Rails 5.2 and 6.0 as well as Ruby 2.6 and 2.7 they've been end-of-lifed by @dougmrqs and @HeitorMC.
The gem now supports Ruby 3.0+ and Rails 6.1+. (#1521, #1522, #1547, #1548)
Bug fixes
- Fix validate_uniqueness_of matcher not supporting column of the type timestampz by @callahat. (#1544)
- Ensure that validation specs work for ActiveModel without ActiveRecord by @stonefield. (#1580)
Features
- Add normalize matcher by @stephannv. (#1558)
- Add validates_comparison_of matcher by @matsales28. (#1552)
- Add support for Ruby 3.2 by @petergoldstein. (#1536)
- Add support for Ruby 3.3.0-rc1 by @mtasaka and @VSPPedro. ([#1579], #1588)
- Add support for Rails 7.1 by @matsales28. (#1573)
- Add support for array attributes on validate_length_of matcher by @jarenas9539. #1560
- Allow length validation on associations by @matsales28. (#1569)
- Improve have_db_index to better handle columns with multiple indexes by @abrom. (#1542)
- Implement of_sql_type qualifier on have_db_column matcher by @matsales28. (#1555)
Improvements
- When an unrelated error is seen with negated allow_value, give a hint by @matsales28. (#1570)
Thanks everyone for the contributions!
- Ruby
Published by matsales28 about 2 years ago
https://github.com/thoughtbot/shoulda-matchers - v5.3.0
Features
-
Add
in: rangematcher to validate_numericality_of by @matsales28 . (#1512) -
Support :uuid column type for validate_absence_of matcher by @dlupu. (#1518)
Bug fixes
- Fix confusing error message from validate_inclusion_of matcher when used against a polymorphic association. (#1523)
- Ruby
Published by VSPPedro about 3 years ago
https://github.com/thoughtbot/shoulda-matchers - v5.2.0
Features
-
Add without_scopes method to enum matcher. (https://github.com/thoughtbot/shoulda-matchers/pull/1453)
-
Add support for Ruby 3.1. (https://github.com/thoughtbot/shoulda-matchers/pull/1474)
-
Add allow_blank method to validate_presence_of matcher. (https://github.com/thoughtbot/shoulda-matchers/pull/1499)
-
Add support for Rails 7.0. No new Rails 7.0 features are supported, but only existing features that broke with the upgrade. (https://github.com/thoughtbot/shoulda-matchers/pull/1506)
Thanks @technicalpickles, @dewyze, @andreLumor for your contributions!
- Ruby
Published by VSPPedro over 3 years ago
https://github.com/thoughtbot/shoulda-matchers - v5.1.0
Bug fixes
- Fix the undefined method error for non rails project due to use of many? - method from ActiveSupport. (#1459)
Features
-
Add array option support for have db column matcher. (#1465)
-
Add enum attributes support for validate_absence_of matcher. (#1464)
- Ruby
Published by VSPPedro about 4 years ago
https://github.com/thoughtbot/shoulda-matchers -
Bug fixes
- Replace
in?, method from ActiveSupport, withinclude?to prevent exception "undefined methodin?" on non-Rails app. (#1405)
Features
-
Add support for Rails 6.1. No new Rails 6.1 features are supported, but only existing features that broke with the upgrade. (#1418)
-
Add support for RVM (Ruby Version Manager) to setting up local environment. (#1424)
-
Add support for alias in matcher define_enum. (#1419)
Improvements
- Remove deprecated warnings emitted on Rails 6.1 in ActiveModel errors. (#1444)
Backward-incompatible changes
-
Drop support for Rails 4.2, 5.0 and 5.1 as well as Ruby 2.4 and 2.5
they've been end-of-lifed. The gem now supports Ruby 2.6+ and Rails 5.2+. (#1412, #1415, #1422, #1428, #1429) -
Remove deprecated matchers:
use_before_filter,use_after_filter,use_around_filterandallow_mass_assignment_of. (#1430, #1431)
- Ruby
Published by VSPPedro over 4 years ago
https://github.com/thoughtbot/shoulda-matchers -
Bug fixes
- Replace
in?, method from ActiveSupport, withinclude?to prevent exception "undefined methodin?" on non-Rails app. (#1405)
Features
-
Add support for Rails 6.1. No new Rails 6.1 features are supported, but only
existing features that broke with the upgrade. (#1418) -
Add support for RVM (Ruby Version Manager) to setting up local environment. (#1424)
-
Add support for alias in matcher define_enum. (#1419)
Backward-incompatible changes
-
Drop support for Rails 4.2, 5.0 and 5.1 as well as Ruby 2.4 and 2.5
they've been end-of-lifed. The gem now supports Ruby 2.6+ and Rails 5.2+.(#1412, #1415, #1422, #1428, #1429) -
Remove deprecated matchers:
use_before_filter,use_after_filter,use_around_filterandallow_mass_assignment_of. (#1430, #1431)
- Ruby
Published by VSPPedro over 4 years ago
https://github.com/thoughtbot/shoulda-matchers -
Bug fixes
- Update
belongs_toto work with composite primary keys. (#1396)
- Ruby
Published by VSPPedro about 5 years ago
https://github.com/thoughtbot/shoulda-matchers -
Features
- Add support for has_secure_password custom attributes. (#1356)
Bug fixes
- Fix
bundle exec yard docreplacing pygments.rb with rouge to keep the documentation up to date. (#1343) - Fix have_db_column.with_options not raising an error when the user adds an invalid value. (#1358)
- Fix default value of assossiation_matcher.validate option. It was returning false instead of true. (#1378)
- Fix validate_absence_of failing for array columns. (#1383)
Improvements
- Replace all links with http to https. (#1340)
- Update the links for have_and_belong_to_many, have_many and have_one in the README to redirect the user to where the matcher description starts. (#1348)
- Drop
git ls-filesin gemspec to help downstreams maintenance, because they often need to build packages in an environment that does not have git. (#1354) - Add comment about no support of validate_uniqueness_of(:item).scoped_to(array). (#1355)
- Improve error message for assossiation_matcher.with_foreign_key option. (#1376)
- Ruby
Published by VSPPedro about 5 years ago
https://github.com/thoughtbot/shoulda-matchers - v4.4.0
Features
-
Add an
ignoring_check_for_db_indexqualifier to thehave_secure_token
matcher, sincehas_secure_tokenencourages use of an index but does not
enforce 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 the
implicit_order_columnsetting for ActiveRecord models under Rails 6+.
(#1243) -
Add a new
is_other_thanqualifier tovalidate_numericality_ofto be able
to test the numericality validation's:other_thanoption. (#1282) -
Add a new
have_one_attachedandhave_many_attachedmatchers for testing
the 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 is
really long. (#1290) -
Fix
have_manyso that it is possible to test an association that has a scope
that takes an argument. (#952, #992) -
Update
validate_uniqueness_ofto use the publicvalidators_oninstead of
the private_validatorswhen reading validations off of a model. This
enables 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_tablequalifier
you can pass a symbol rather than a string. (#1323)
Improvements
-
Update
have_manywhen used against a:throughassociation so that it fails
if the inverse model does not have abelongs_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)
- Ruby
Published by mcmire over 5 years ago
https://github.com/thoughtbot/shoulda-matchers - v4.3.0
Features
- Add
have_rich_textmatcher forActionText(#1263)
Improvements
- Use range on
validate_exclusion_of#in_rangedocumentation (#1273)
Bug fixes
- Fix
missing attribute:: scope 1intermittent test: (#1274)
- Ruby
Published by guialbuk about 6 years ago
https://github.com/thoughtbot/shoulda-matchers - v4.2.0
Features
- Add support for
optional: falseinbelongs_toassociations. (#1237) - Add support for associations with
inverse_of: falseand non-standard foreign key (#1106)
Bug fixes
- Fix typos in documentation of
allow_values(#1241) - Fix appraisal command in CONTRIBUTING.md file (#1253)
Improvements
- Remove
minitest-reportersdependency ([#1251]) - Development dependency updates
- Ruby
Published by guialbuk about 6 years ago
https://github.com/thoughtbot/shoulda-matchers - v4.1.1
Bug fixes
- Patch some backward-incompatible changes to
validate_presence_ofthat were
made in the last version. As of 4.1.0 the presence matcher now checks to
ensure that empty string will cause the record to be invalid (in addition to
nil, which it was already checking against). However, this check was being
performed even if the attribute or column the presence matcher is being run
against didn't support being set to an empty string. This releases fixes this.
(#1222, #1224, #1231)
- Ruby
Published by mcmire over 6 years ago
https://github.com/thoughtbot/shoulda-matchers - v4.1.0
Bug fixes
- Fix
validate_uniqueness_ofso that it works when a scope is defined as a
string instead of a symbol on the model. (#1176) - Fix
have_db_indexso that it can be used against multiple models that are
connected to different databases. (#1200)
Features
- Add support for Rails 6. No new Rails 6 features are supported, but only
existing features that broke with the upgrade. (#1193) - Add support for expression indexes (Rails 5, Postgres only) to
have_db_index. (#1211) - Add
allow_nilto thevalidate_presence_ofmatcher. (834d8d0, #1100)
Improvements
- Update
validate_presence_ofso that if it is being used against an
association which isrequired: trueoroptional: false, or it is not
configured as such but ActiveRecord defaultsbelong_toassociations to
optional: false, and the matcher fails, the developer is reminded in the
failure message that thebelong_tomatcher can be used instead. (#1214,
8697b01) - Update
define_enum_forso that it produces a more helpful message on
failure. (#1216)
- Ruby
Published by mcmire over 6 years ago
https://github.com/thoughtbot/shoulda-matchers - v4.0.1
Fix gemspec so that setup script isn't installed globally when gem is installed.
- Ruby
Published by mcmire about 7 years ago
https://github.com/thoughtbot/shoulda-matchers - v4.0.0 (yanked)
- Rails 5.x support
- Ruby 2.4+ support
- Improve negative versions of validation matchers
- Drop support for Ruby 2.0 and 2.1
- Drop support Rails 4.0 and 4.1
- Ruby
Published by guialbuk about 7 years ago
https://github.com/thoughtbot/shoulda-matchers - v4.0.0.rc1
Adds support for Ruby 2.4 and 2.5 and Rails 5.x.
Drops support for Ruby 2.0 and 2.1 as well as Rails 4.0 and 4.1.
- Ruby
Published by guialbuk over 7 years ago
https://github.com/thoughtbot/shoulda-matchers - v3.1.2
Deprecations
- This is the last version that supports Rails 4.0 and 4.1 and Ruby 2.0 and 2.1.
Bug fixes
-
When the
permitmatcher was used without#on, the controller did not use
params#require, the params object was duplicated, and the matcher did not
recognize the#permitcall inside the controller. This behavior happened
because the matcher overwrote double registries with the same parameter hash
whenever ActionController::Parameters was instantiated.- Commit: [44c019]
- Issue: [#899]
- Pull request: [#902]
- Ruby
Published by guialbuk over 8 years ago