rubyMine 'MiniTest framework was detected' error when running all model tests.
I can run all model tests at the regular command line.
e.g. rake spec:models
When I use rubyMine:
I can run one model test ok.
However when I try to run all tests in model I getMiniTest framework was detected. It is a limited version of original Test::Unit framework.
RubyMine/IDEA Ruby plugin test runner requires full-featured version of the framework,
otherwise default console tests reporter will be used instead.
Please install 'test-unit' gem and activate it on runtime.
I tried adding the 'test-unit' to my Gemfile and rebundling but now get:
`/home/durrantm/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
/home/durrantm/Downloads/RubyMine-3.2.3/rb/testing/runner/tunit_in_folder_runner.rb
Testing started at 9:33 AM ...
Work directory: /home/durrantm/Dropbox_not_syncd/webs/3/rubyists/spec/models}
Loading files....
=========================================
0 files were loaded.
=========================================
Searching test suites...
=========================================
0 test suites, 0 tests, 0 assertions, 0 failures, 0 errors
Process finished with exit code 0`
Note: funny } in work directory. I still get the Unable to attach test_reporter to test fraemwork message
.
Versions: Ubuntu 11 RubyMine 3.2
I finally got this to work.
Mostly by changing stuff under Menus:
Run -> Edit configurations -> Click on Rspec -> Create a new Configuration.
For the new configuration made sure specs folder points to the application specs models.
Final step (the one that actually that got it working) was to set the working directory (still on the run/debug configuration screen that is) to be my applications root!
The other thing I had also done was to add gem 'test-unit'
to the Gemfile and bundled it of course. However later testing (removing it and unbundling) showed it not to be needed and in fact was making tests run multiple times with empty suites (maybe trying default unit::test as well as running rspec).
I also had this problem but solved it differently than the other posters.
In rubymine I added the minitest-reporters gem. Then in my minitest_helper.rb I added the following:
require "minitest/reporters"
MiniTest::Unit.runner = MiniTest::SuiteRunner.new
MiniTest::Unit.runner.reporters << MiniTest::Reporters::RubyMineReporter.new
On my system, the problem was the "redgreen" gem. It automatically colors the progress marks (dots) and the Test::Unit summary messages based on success or failure. There must be something in RubyMine that's trying to parse the Test::Unit results (the output of "rake test", I imagine), and it's choking on the ANSI sequences.
I commented out "require 'redgreen'" in my test/test_helper.rb, and the problem went away. I really like redgreen for executing "rake test" from the shell, though, so I put this in test_helper to make it work for both "rake test" and within RubyMine:
require 'redgreen' if $stdin.tty?
It may not be redgreen that's causing your problem, but be suspicious of anything which might create unconventional Test::Unit output.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With