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 4b96be052..f152cb540 100644 --- a/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb +++ b/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb @@ -310,8 +310,8 @@ def in_range(range) self end - def allow_blank(allow_blank = true) - @options[:allow_blank] = allow_blank + def allow_blank + @options[:allow_blank] = true self end @@ -319,9 +319,8 @@ def expects_to_allow_blank? @options[:allow_blank] end - def allow_nil(allow_nil = true) - @options[:allow_nil] = allow_nil - self + def allow_nil + @options[:allow_nil] = true end def expects_to_allow_nil?