spec/support/model_helpers.rb in validates_timeliness-5.0.0.alpha5 vs spec/support/model_helpers.rb in validates_timeliness-5.0.0.beta1
- old
+ new
@@ -15,11 +15,10 @@
end
end
def with_each_person_value(attr_name, values)
record = Person.new
- values = [values] unless values.is_a?(Array)
- values.each do |value|
+ Array.wrap(values).each do |value|
record.send("#{attr_name}=", value)
yield record, value
end
end