thoughtbot--shoulda-matchers/lib/shoulda/matchers
Elliot Winkler ca6a1ff9ee Improve messaging of .required and .optional
When the `required` and `optional` qualifiers on `belong_to` fail, the
message can be a little confusing. There are actually two ways to
satisfy both qualifiers. One way, of course, is to match the option on
the association with the qualifier itself, so if the association is
defined with `required: true`, that will match
`belong_to(...).required`, and if it's `required: false`, that will
match `belong_to(...).required(false)` (and similar for `optional`). The
second way, though, is to manually add a presence validation to the
association (this will obviously only match `required(true)`). We need
to update the failure message to reflect these cases.
2019-02-14 17:48:26 -07:00
..
action_controller Replace the with_port qualifier on route with port option 2018-01-25 22:31:23 -06:00
active_model ValidateInclusionOfMatcher#allow_nil should return `self` 2019-02-14 03:31:32 -07:00
active_record Improve messaging of .required and .optional 2019-02-14 17:48:26 -07:00
doublespeak Doublespeak: Define #respond_to_missing? on ObjectDouble 2017-09-17 17:46:06 -05:00
independent Update docs for delegate_method 2018-01-24 02:54:30 -06:00
integrations Add a new Routing module 2015-09-25 17:45:33 -06:00
util Improve failure messages for define_enum_for 2018-01-28 00:47:44 -06:00
action_controller.rb Rename StrongParametersMatcher to PermitMatcher 2015-02-28 19:30:33 -07:00
active_model.rb Update RSpec test style across docs 2016-06-15 18:02:07 -06:00
active_record.rb Merge pull request #1058 from thoughtbot/add-optional-and-required 2017-10-18 20:26:46 -02:00
configuration.rb Remove auto-detection of Rails / test framework 2015-02-09 10:52:51 -07:00
doublespeak.rb Permit matcher now supports subparameters 2015-03-01 01:32:00 -07:00
error.rb Tighten CouldNotSetAttributeError restriction 2015-09-27 14:56:59 -06:00
independent.rb Rename DelegateMatcher to DelegateMethodMatcher 2014-08-29 11:57:26 -06:00
integrations.rb Omit newest private modules from docs 2015-03-01 01:20:45 -07:00
matcher_context.rb Documentation updates 2014-12-25 01:13:30 -05:00
rails_shim.rb Add failing tests for issue 1146 2019-01-29 23:33:06 -07:00
routing.rb Replace the with_port qualifier on route with port option 2018-01-25 22:31:23 -06:00
util.rb Improve failure messages for define_enum_for 2018-01-28 00:47:44 -06:00
version.rb Update gem version to 4.0.0.rc1 2018-10-02 13:34:55 -03:00
warn.rb Improve the word_wrap utility method 2015-10-08 21:30:41 -06:00