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
1 changed files with 4 additions and 5 deletions

View File

@ -310,8 +310,8 @@ EOT
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 @@ EOT
@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?