Why I cannot run my tests from within RubyMine?
Hi,
I am developing a Rails project and I have problem running my tests from within RubyMine. Tests run successfully with rake test when I am on operating system prompt. But from within RubyMin I get the following:
/home/panayotis/my_programs/RubyMine-4.0/rb/testing/patch/testunit/test/unit/ui/teamcity/testrunner_events.rb:176:in `test_finished': Finished test '(AbilityTest)'[(AbilityTest)] doesn't correspond to current running test 'test_account_owner_can_create_case_emails(AbilityTest)'[AbilityTest.test_account_owner_can_create_case_emails]! (Rake::TeamCity::InnerException)
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/util/observable.rb:78:in `call'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/util/observable.rb:78:in `block in notify_listeners'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/util/observable.rb:78:in `each'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/util/observable.rb:78:in `notify_listeners'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/ui/testrunnermediator.rb:49:in `block in run_suite'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/activesupport-3.0.11/lib/active_support/testing/setup_and_teardown.rb:93:in `run'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/testsuite.rb:46:in `run'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/testsuite.rb:46:in `run'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/ui/testrunnermediator.rb:48:in `run_suite'
from /home/panayotis/my_programs/RubyMine-4.0/rb/testing/patch/testunit/test/unit/ui/testrunnermediator.rb:41:in `run_suite'
from /home/panayotis/my_programs/RubyMine-4.0/rb/testing/patch/testunit/test/unit/ui/teamcity/testrunner.rb:131:in `start_mediator'
from /home/panayotis/my_programs/RubyMine-4.0/rb/testing/patch/testunit/test/unit/ui/teamcity/testrunner.rb:119:in `start'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/ui/testrunnerutilities.rb:24:in `run'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/autorunner.rb:343:in `run'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit/autorunner.rb:58:in `run'
from /home/panayotis/.rvm/gems/ruby-1.9.3-p0@fraudpointer/gems/test-unit-2.2.0/lib/test/unit.rb:326:in `block in <top (required)>'
I using RubyMine Build #RM-113.13 and test-unit 2.2.0 (as you can see from the logs too).
This is the list of gems that I believe are related to this:
ruby-debug-base19 (0.11.26, 0.11.25)
ruby-debug-base19x (0.11.30.pre10)
ruby-debug19 (0.11.6)
ruby-debug-ide (0.4.17.beta8)
test-unit (2.2.0)
Any help, would be greatly appreciated.
Thanks in advance
Panayotis
请先登录再写评论。
Hi,
I've just tried test-uit 2.2.0 and I cannot reproduce it. Could you attach some small sample project where the error can be easily reproduced?
Hi, thanks of answer,
I have started a new small project and I cannot replicate the error. I will see what is going on wrong on the big project that I have and that I encounter this error. If you can give me any hint/help let me know.
Panayotis
Let me give you some update on this.
I can run my tests from within RubyMine as long as I have the flag "Attach test runner UI for frameworks - Test::Unit" switched OFF. If I have it switched ON then I get the error that I have in the start of my message.
And again, this does not happen in a simple Rails project.
Panayotis
I have solved my problem by removing "test-unit".
I now use "mini-test" and "minitest-reporters".
I have also included the following in my test_helper.rb file:
Now, everything works ok.