From 59149c26ffc52f7fff1cd3bb1ce06497cf7595fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Maniaci?= Date: Fri, 22 Mar 2024 05:22:40 +0100 Subject: [PATCH] fix: with_high_message expects a custom validation message too The only impact being in the generated documentation (via description_clauses_for_qualifiers): before: > is expected to validate that Y lies inside the range R after > is expected to validate that X lies inside the range R producing a custom validation error on failure As with_low_message already does. --- .../matchers/active_model/validate_inclusion_of_matcher.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb b/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb index 9395cb5bd..f43ace91f 100644 --- a/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +++ b/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb @@ -344,6 +344,7 @@ def with_low_message(message) def with_high_message(message) if message + @expects_custom_validation_message = true @high_message = message end