1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/lib/shoulda/matchers/active_model
Elliot Winkler a23081f759 Tweak allow_value failure_message
This commit changes the failure message that `allow_value` generates so
that it reads a bit nicer.

When a call to #valid? resulted in validation messages, `allow_value`
formerly failed with this message:

    Expected errors to include "the message" when attr is set to "some value", got errors: ["another message (attribute: \"attr\", value: \"some value\")", "some other message (attribute: \"attr2\", value: \"some other value\")"]

Now it fails with this message:

    Expected errors to include "the message" when attr is set to "some value",
    got errors:
    * "another message" (attribute: attr, value: "some value")
    * "some other message" (attribute: attr2, value: "some other value")

Similarly, when a call to #valid resulted in an exception, `allow_value`
formerly failed with this message:

    Expected errors to include "the message" when attr is set to "some value", got: some message

Now it fails with this message:

    Expected errors to include "the message" when attr is set to "some value",
    got: "some message"
2014-10-17 11:28:47 -06:00
..
numericality_matchers Remove all Ruby-emitted warnings 2014-07-18 18:00:08 -06:00
uniqueness Fix uniqueness matcher when scope is a *_type attr 2014-10-08 23:22:54 -06:00
allow_mass_assignment_of_matcher.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
allow_value_matcher.rb Tweak allow_value failure_message 2014-10-17 11:28:47 -06:00
disallow_value_matcher.rb Prefer protected over private attributes 2014-06-27 14:41:54 -06:00
ensure_length_of_matcher.rb Typo fix in ensure_length_of documentation 2014-08-27 14:04:39 +02:00
errors.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
exception_message_finder.rb Tweak allow_value failure_message 2014-10-17 11:28:47 -06:00
have_secure_password_matcher.rb Prefer protected over private attributes 2014-06-27 14:41:54 -06:00
helpers.rb Tweak allow_value failure_message 2014-10-17 11:28:47 -06:00
numericality_matchers.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
uniqueness.rb Fix uniqueness matcher when scope is a *_type attr 2014-10-08 23:22:54 -06:00
validate_absence_of_matcher.rb validate_absence_of: cast @attribute to String 2014-08-14 15:34:18 -04:00
validate_acceptance_of_matcher.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
validate_confirmation_of_matcher.rb Remove all Ruby-emitted warnings 2014-07-18 18:00:08 -06:00
validate_exclusion_of_matcher.rb Deprecate ensure_exclusion_of 2014-07-23 19:42:19 -06:00
validate_inclusion_of_matcher.rb Tweak warning to be descriptive, not prescriptive 2014-08-14 14:51:17 -04:00
validate_numericality_of_matcher.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
validate_presence_of_matcher.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
validate_uniqueness_of_matcher.rb Fix uniqueness matcher when scope is a *_type attr 2014-10-08 23:22:54 -06:00
validation_matcher.rb Remove all Ruby-emitted warnings 2014-07-18 18:00:08 -06:00
validation_message_finder.rb Tweak allow_value failure_message 2014-10-17 11:28:47 -06:00