Community
Participate
Working Groups
Build Identifier: 20100618-0524 After installing Ruby 1.9.2 and setting it as interpreter I was not able to run unit test anymore within Eclipse. From some research on the internet I learned that Ruby 1.9 has changed the default UnitTest library to minitest. To get my unit test running again I installed the test-unit gem (test-unit-2.1.1), the library normally shipped with Ruby. Then I tried to run a unit test and got the following error: eclipse/configuration/org.eclipse.osgi/bundles/416/1/.cp/testing/dltk-testunit-runner.rb:252:in `block in <top (required)>': uninitialized constant Test::Unit::UI::SILENT (NameError) After some searching in the dltk-testunit-runner.rb file and several Test::Unit files I figured out that I have to replace line 252 in the dltk-testunit-runner.rb file with this line: autoRunner.runner_options[:output_level] = Test::Unit::UI::Console::OutputLevel::SILENT After this change, I can run my tests again in Eclipse. I believe the tricky part will be to decide which test-unit version is installed to use the correct way to configure the silent mode. DLTK Version Installed: Dynamic Languages Toolkit - Ruby Development Tools 2.0.0.v20100505-1154-7G--E_EkMU3NHhvAUo0G org.eclipse.dltk.ruby.feature.group Reproducible: Always Steps to Reproduce: 1. Setup Eclipse with Ruby 1.9.2 2. Install the test-unit-2.1.1 gem 3. Run a unit test
A workaround is to mixin the missing symbols and methods # compat mixin for Ruby 1.9.1 with test-unit gem in Eclipse module Test module Unit module UI SILENT = false end class AutoRunner def output_level=(level) self.runner_options[:output_level] = level end end end end
I committed to github.com a fix for this issue and created the merge request. https://github.com/eclipse/dltk.ruby/pull/2
New Gerrit change created: https://git.eclipse.org/r/68897
Gerrit change https://git.eclipse.org/r/68897 was merged to [master]. Commit: http://git.eclipse.org/c/dltk/org.eclipse.dltk.ruby.git/commit/?id=76ee25e3349d3b5d53d5da301deb79752016e821
Fixed in master now.