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:
parent
7f070cbab4
commit
97e2569253
1 changed files with 4 additions and 5 deletions
|
@ -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?
|
||||||
|
|
Loading…
Reference in a new issue