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

12 comments

Hello Ingo,

what test framework are you using?

0

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

0

And what Ruby version are you using?

0

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

0

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
0

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:

require 'minitest/reporters'
MiniTest::Reporters.use!

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.
0

What version of minitest-reporters do you use?

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.
0

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 :)

0

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.

0

Please sign in to leave a comment.