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/spec/support/unit
Elliot Winkler e708789714 Fix failure message for numericality matcher
Secondary author: Mauro George <maurogot@gmail.com>

Sometimes the failure message did not always provide the reason for
failure. For instance, given this validation:

    validates :ano, numericality: { only_integer: true, greater_than_or_equal_to: 1900 }

this test:

    it { should validate_numericality_of(:ano).is_greater_than_or_equal_to(1900) }

would fail with the following:

    Did not expect errors  when ano is set to 1900.000000000001, got error:

as you can see, the failure message doesn't contain the validation
error.

In the process of making this fix, we changed how the matcher fails so
that it will so when the first submatcher fails, not the last. This
changes what the failure message looks like, but not the basic
functionality of the matcher itself.
2015-06-01 01:38:35 -06:00
..
helpers Fix failure message for numericality matcher 2015-06-01 01:38:35 -06:00
matchers Fix failure message for numericality matcher 2015-06-01 01:38:35 -06:00
shared_examples Consolidate set_session and set_flash APIs 2015-02-09 10:52:51 -07:00
capture.rb Remove warning about #capture under 4.2+ 2014-12-25 00:45:06 -05:00
i18n.rb Reorganize unit tests, part I 2014-11-04 14:43:59 -07:00
rails_application.rb Add support for Postgres 2015-02-12 16:01:00 -07:00
record_builder_with_i18n_validation_message.rb Reorganize unit tests, part II 2014-11-05 09:53:20 -07:00
record_validating_confirmation_builder.rb Remove Rails 3.x, Ruby 1.9.2, Ruby 1.9.3 2015-02-09 10:52:22 -07:00
record_with_different_error_attribute_builder.rb Fix warning for this file 2014-12-16 20:21:22 -07:00