"spec" rake task random spec failures

When I run the "rake spec" command from inside RubyMine (OS X), I get lots of random spec failures.

RuntimeError: Couldn't save #<Object>
ActiveRecord::StatementInvalid: Mysql::Error:

Errno::ECONNREFUSED: Connection refused - connect(2)

However, when I run rake spec from outside RubyMine none of these specs fail.

These errors seem, on the surface, to be race conditions. However I'm totally unfamiliar with how rake inside of RubyMine works, so I have no idea the validity of that guess.

Does anyone have any suggestions? I'd really love to use RubyMine but uncertainty with spec breakage is a killer for me.

1 comment
Comment actions Permalink

RubyMine executes rake tasks using rake. We just provide our custom formatter for task's results. Which version of rake, rails and spec do you use? Does you specify some spec options in spec rake task (t.spec_opts=..)?


Please sign in to leave a comment.