Skip to content

Bump shoulda-matchers from 4.0.1 to 4.1.0

NipaNipa requested to merge dependabot/bundler/shoulda-matchers-4.1.0 into master

Bumps shoulda-matchers from 4.0.1 to 4.1.0.

Changelog

Sourced from shoulda-matchers's changelog.

4.1.0

Bug fixes

  • Fix validate_uniqueness_of so that it works when a scope is defined as a string instead of a symbol on the model. (#1176)
  • Fix have_db_index so that it can be used against multiple models that are connected to different databases. (#1200)

#1176: #1176 #1200: #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_nil to the validate_presence_of matcher. ([834d8d0], #1100)

#1193: #1193 #1211: #1211 [834d8d0]: https://github.com/thoughtbot/shoulda-matchers/commit/834d8d0356573b9f47e63a1b910cfa8f3d815e51 #1100: #1100

Improvements

  • Update validate_presence_of so that if it is being used against an association which is required: true or optional: false, or it is not configured as such but ActiveRecord defaults belong_to associations to optional: false, and the matcher fails, the developer is reminded in the failure message that the belong_to matcher can be used instead. (#1214, [8697b01])
  • Update define_enum_for so that it produces a more helpful message on failure. (#1216)

#1214: #1214 [8697b01]: https://github.com/thoughtbot/shoulda-matchers/commit/8697b015ed88fdbbbcf5d31bf98670f17c3df9e1 #1216: #1216

Commits

Merge request reports