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
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
..
action_controller FilterParamMatcher supports Regexps 2014-08-13 22:21:53 -04:00
active_model Tweak allow_value failure_message 2014-10-17 11:28:47 -06:00
active_record Make sure foreign keys can be specified as symbols for has_and_belongs_to_many associations. 2014-10-09 01:36:04 -06:00
doublespeak Remove all Ruby-emitted warnings 2014-07-18 18:00:08 -06:00
independent Fix delegate_method when used with shoulda-context 2014-10-08 01:05:37 -06:00
integrations Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
action_controller.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
active_model.rb Fix uniqueness matcher when scope is a *_type attr 2014-10-08 23:22:54 -06:00
active_record.rb Create the define_enum_for matcher 2014-08-26 14:44:27 -06:00
assertion_error.rb Use same assertion class as Rails, if loaded 2014-06-27 14:06:47 -06:00
doublespeak.rb Allow multiple StrongParametersMatchers to exist at once. 2014-06-21 21:56:47 -06:00
error.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
independent.rb Rename DelegateMatcher to DelegateMethodMatcher 2014-08-29 11:57:26 -06:00
matcher_context.rb Fix delegate_method when used with shoulda-context 2014-10-08 01:05:37 -06:00
rails_shim.rb Extract examples in README to inline documentation 2014-06-20 16:41:27 -06:00
util.rb Fix define_class/model to support namespaces 2014-10-08 23:22:50 -06:00
version.rb Bump version to 2.7.0 2014-09-03 00:38:41 -06:00
warn.rb Deprecate ensure_inclusion_of 2014-07-23 19:35:20 -06:00