Rake fixtures not populating correctly

I downloaded a Rails codebase and opened it in RubyMine on Windows. When I try to run functional tests the fixtures aren't being initialized, with errors like:

    Field 'created_at' doesn't have a default value: INSERT INTO `mytable` (`name`, `code`) VALUES ('MyString', 'MyString')

It's like record_timestamps is set to false, but explicitly setting it to true in config/test.rb makes no difference. The tests work correctly on a Linux machine with no IDE. How can I get the fixtures to load properly?

(I asked this question on StackOverflow as well http://stackoverflow.com/questions/24369551/rake-fixtures-not-populating-correctly )

Comment actions Permalink


are you sure that this is something RubyMine changed in your picture?
I'd test if everything works ok on Windows in command line first or on Linux with RubyMine ;)
If RubyMine is the cause of the problem it would be nice to know how you run tests under it (rake, all tests in directory, just particular test)

Regards, Oleg.

Comment actions Permalink

I get the same error whether I run a single test, all tests in a file, or by calling "rake test" from Tools - Run Rake Task. But I do get the same error from the command line, so I don't believe it's a RubyMine issue specifically.


Please sign in to leave a comment.