mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
e708789714
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. |
||
---|---|---|
.. | ||
shoulda/matchers |