When I try to run the tests from within RubyMine I have an issue. But what is strange is that it work fine when I run the tests from the command line.
\"Test
I had the same issue and I fixed this by removing 'guard-minitest' from Gemfile
You should be sure that your test suite is running with RAILS_ENV=test
For RubyMine you can set this up in Run > Edit Configurations.. > Choose test suite you want to run (i.e. spec: project_name) > Environment variables
and there add variable mentioned above.