1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00

Keep consistency on allow_blank and allow_nil qualifiers

After some discussion[1] was decided that these qualifiers do not accept
any parameter.

https://github.com/thoughtbot/shoulda-matchers/pull/722
This commit is contained in:
Mauro George 2015-07-01 18:19:33 -03:00 committed by Gui Vieira
parent 7f070cbab4
commit 97e2569253

View file

@ -310,8 +310,8 @@ EOT
self self
end end
def allow_blank(allow_blank = true) def allow_blank
@options[:allow_blank] = allow_blank @options[:allow_blank] = true
self self
end end
@ -319,9 +319,8 @@ EOT
@options[:allow_blank] @options[:allow_blank]
end end
def allow_nil(allow_nil = true) def allow_nil
@options[:allow_nil] = allow_nil @options[:allow_nil] = true
self
end end
def expects_to_allow_nil? def expects_to_allow_nil?