Intellij 11, Ruby Plugin: Unable to attach test reporter...
Hello,
when i run rake test, the test is performed well in the console, finishing with Process finished with exit code 1 but i get the message
Unable to attach test reporter to test framework or test framework quit unexpected
I found some similar postings here but non one that could help me out as a newbie...
Thanks in advance Ingo
Please sign in to leave a comment.
Hello Ingo,
what test framework are you using?
I did not change anything to Rails 3.2.3 and Intellij standard installation so its Test:Unit. When i try rake rspec , its the same.
And its on Mac OS Lion
And what Ruby version are you using?
a, sorry 1.9.3p125
If you're using ruby 1.9.3, then you're using minitest framework that ships with 1.9 instead of Test::Unit. You can find instructions on setting up minitest in RubyMine help
Seems to run now, allthoug i don't fully understand what am i doing here...
I followed the steps in the help and just added this to the beginning of my test/test_helper.rb
require 'minitest/reporters'
MiniTest::Unit.runner = MiniTest::SuiteRunner.new
MiniTest::Unit.runner.reporters << MiniTest::Reporters::RubyMineReporter.new
So the Run > Edit Configurations - Dialog is a bit missleading near "Attach Test Runner UI..." where you choose Test::Unit
Thank You!
Attachment(s):
Bildschirmfoto 2012-04-18 um 16.43.49.JPG
This instruction didn't work for me. It is said that for minitest-reporters gem 0.8.0 or higher I should use the following code fragment:
I put these declarations into my test_helper.rb file but they caused that tests didn't be executed:
So I tried with the second one version:
require 'minitest/reporters' MiniTest::Unit.runner = MiniTest::SuiteRunner.new MiniTest::Unit.runner.reporters << MiniTest::Reporters::RubyMineReporter.new
and now everything is ok.
What version of minitest-reporters do you use?
minitest-reporters (0.9.0)
Hmm, it is strange.
require 'minitest/reporters'
MiniTest::Reporters.use!
works fine for me :(
Could you check value of MiniTest::Unit.runner and MiniTest::Unit.runner.reporters after use! call?
BTW do you have test-unit gem in your gem environment? And what version of Ruby do you use?
Regrds, Oleg.
Strange, but now when I change these two lines:
require 'minitest/reporters'
MiniTest::Unit.runner = MiniTest::SuiteRunner.new
MiniTest::Unit.runner.reporters << MiniTest::Reporters::RubyMineReporter.new
to:
require 'minitest/reporters'
MiniTest::Reporters.use!
everything is still working. In past it just stoped after writing in the console:
Run options: --seed 57408
Now, I can see that all my tests are done:
** Execute test:prepare
** Execute test:units
Run options: --seed 64456
Started
Finished in 0.94144s
8 tests, 34 assertions, 0 failures, 0 errors, 0 skips
Process finished with exit code 0
I don't have test-unit gem in my gem environment and I'm working on Ruby 1.9.3p194. I don't understand why it's working now but thanks for your attention :)
Ok, let's keep is as "VERY STRANGE THING" ;)
If you will find the situation when these lines don't work, please let us know.
Thanks in advance, Oleg.