Test passes when run isolated, fails when run using "rake test"

Hi,

I got very simple unit test (creates new object and checks if it's
successfuly saved) that passes when I run only the file, which
contains this test, but fails when I run "rake test".

Any ideas what can be wrong?

Hi,

I got very simple unit test (creates new object and checks if it's
successfuly saved) that passes when I run only the file, which
contains this test, but fails when I run "rake test".

Tests tend to assume that each individual test is isolated from subsequent ones. If this isn't the case then you can see things similar to what you describe.
A common one is having transactional fixtures turned on but the database not supporting transactions (if you're using mysql and it has defaulted to myisam tables) and things like that.

Fred

Thanks! That was it.