LoadError while attempting to run minitest under RubyMine EAP Momiji

I am having an issue trying to run minitest under RubyMine EAP Momiji -- it fails to run with an "Exception message: LoadError".

Trying to run the following minitest...

require 'minitest/autorun'
require 'minitest/reporters'
require 'cinch-storage'


module Cinch
  module Extensions
    class TestStorage < Minitest::Unit::TestCase
      def setup
        @test = Cinch::Extensions::Storage.register(:test)
        @test[:test1] = 'value1'

      def test_storage_exists
        assert true, Storage.exists?(:test)


Results in the following error from within RubyMine (via 'Run all tests in: test'):

Fail to load: /Users/dyoung/Dropbox/Source/dyoung/cinch-storage/test/test_storage.rb:1
      Exception message: LoadError
["/Applications/RubyMine EAP.app/rb/testing/patch/testunit/minitest/unit.rb:24:in `<top (required)>'",
"/Users/dyoung/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/autorun.rb:15:in `require'",
"/Users/dyoung/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/autorun.rb:15:in `<top (required)>'",
"/Users/dyoung/Dropbox/Source/dyoung/cinch-storage/test/test_storage.rb:1:in `require'",
"/Users/dyoung/Dropbox/Source/dyoung/cinch-storage/test/test_storage.rb:1:in `<top (required)>'",
"/Applications/RubyMine EAP.app/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:51:in `require'",
"/Applications/RubyMine EAP.app/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:51:in `block in require_all_test_scripts'",
"/Applications/RubyMine EAP.app/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:44:in `each'",
"/Applications/RubyMine EAP.app/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:44:in `require_all_test_scripts'",
"/Applications/RubyMine EAP.app/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:134:in `<top (required)>'",
"-e:1:in `load'", "-e:1:in `<main>'"]

However, running this from the terminal works as expected.

% ruby test/test_storage.rb
Run options: --seed 32941

1/1: [==================================] 100% 00:00:00

Finished in 0.02310s
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips

Comment actions Permalink


do you have minitest in your Gemfile?  What kind of project do you have?

Regards, Oleg.

Comment actions Permalink
Here's my project Gemfile...

% cat Gemfile
source 'https://rubygems.org'

# Specify your gem's dependencies in cinch-storage.gemspec

group :test do
  gem "minitest"
  gem "minitest-reporters", '>= 0.5.0'

gem 'rspec'
gem 'sqlite3'

This is a plain 'ol ruby project.  You can find the full project here

Comment actions Permalink

Well, here's an interesting update... after I removed rspec, the tests started running.

Seems there are incompatibilities with both RSPEC and MINITEST installed at that same time.

Comment actions Permalink


I've tried your project with rspec added and everything works fine for me :(
Could you please try to restory rspec dependecy and see if the problem is still reproducible for you.
If so either commit Gemfile.lock to the repo (some dedicated branch perhaps) and I will be able to reproduce the problem locally.

Thanks in advance, Oleg.


Please sign in to leave a comment.