Rspec and date testing problem

Is there something special about Rspec handling for date fields?

I set a required date field (validates_presence_of) to nil, say "a.should_not be_valid’ and yet the spec passes. When I display the record, that date field clearly has nil.

That’s odd. I would definitely expect a validation error in that instance.

Can you post a link to a gist of your code and the console output that shows it failing?

Thanks!

I’ll see if I can recreate, but I’ve changed a bunch of stuff and things all seem to be working now.

Ah, the ol’ “change lots of stuff until it’s fixed” debugging method :smile:

Glad to hear it’s working.