217a0b04ea
A previous commit updated the presence matcher so that when it is testing invalid values for the attribute in question, it now considers an empty string as one of those values. However, a string is not always a valid value for an attribute. For instance, an attribute that is decorated with `serialize` where the serialization class is Array cannot be set to a string at all, and doing so will raise an error immediately. With that in mind, this commit adds checks to ensure that it is safe to try an empty string. |
||
---|---|---|
.. | ||
active_model.rb | ||
active_record.rb |