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'

MiniTest::Reporters.use!

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

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

    end
  end
end


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
Started


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


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

4 comments

Hi,

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

Regards, Oleg.

0
Here's my project Gemfile...

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

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

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

gem 'rspec'
gem 'sqlite3'


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

0

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.

0

Hi,

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.

0

Please sign in to leave a comment.