model.errors[:field]
always returns an array of strings, even if there's only a single error.
If the assert was done without the [
]
it would always be false because it would be comparing a string to an array.
assert_equal "must be greater than or equal to 0.01", ["must be greater than or equal to 0.01"]
=> false
assert_equal ["must be greater than or equal to 0.01"], ["must be greater than or equal to 0.01"]
=> true