diff --git a/lib/shoulda/matchers/active_model/allow_value_matcher.rb b/lib/shoulda/matchers/active_model/allow_value_matcher.rb index 023e0833b..5a57f54da 100644 --- a/lib/shoulda/matchers/active_model/allow_value_matcher.rb +++ b/lib/shoulda/matchers/active_model/allow_value_matcher.rb @@ -612,7 +612,8 @@ def inspected_values_to_set def default_expected_message if expects_strict? - "#{human_attribute_name} #{default_attribute_message}" + I18n.t(:"errors.format", attribute: human_attribute_name, + message: default_attribute_message,) else default_attribute_message end