views:

20

answers:

0

I have this validation in my model:

validates_inclusion_of :imported, :in => [true, false]

but still allows Strings and Fixnums. This Shoulda macro returns 2 failures:

should_not_allow_values_for :imported, "blah", 42

and I've checked that the macro isn't at fault by doing this in a test:

@item.imported = 42
assert [email protected]

and I get this failure:

<false> is not true.

Here is the relevant line in schema.rb:

t.boolean  "imported"

Thanks for any help you guys can offer, I really appreciate it. I've been banging my head over this one for a while.