Tests fails in RM RC, (also Beta 3 and Beta 2), but not in rake test

Right-clicking directory test and selecting Run "All in: test" is something I like to do, and do often. But the last weeks I've had problems with my unit tests failing.

If I select a single failed test class and rerun it, it passes.

'rake test' passes

I'm using shoulda, mocha, webrat.

My gut feeling says that it's got something to do with ActiveRecord and RubyMine not running the tests truly independently... Anybody else experiencing this?

1 comment
Comment actions Permalink

Probably you have faced with side effects of your tests and execution order influences on test results. Also results of running tests using rake task and "Run all in.." my differ due to additional initialization (e.g. DB related) which my be performed using rake tasks. It is hard to advice smth in general in your case, try to debug it.

My gut feeling says that it's got something to do with ActiveRecord and RubyMine not running the tests truly independently... Anybody else experiencing this?

RubyMine launches tests using Test::Unit, all in the same process and ObjectSpace. Obviously our launcher and Test::Unit framework doesn't know anything about ActiveRecord side effects or etc. Truly independent execution should provide "test" rake task and "run all in .." isn't designed for it.

0

Please sign in to leave a comment.