This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hi, With a rails application using the gem test-unit 2.0, Netbeans always load the test-unit from ruby installation (old one). I'm using Ruby 1.8.7 with test-unit 2.0.3. A quick test is to use the assert_true method which does not exist in the "old" library. While Rake succeed in testing the application, the test fails under Netbeans with an undefined method error. I suspect that the "error" is in ruby code (but I'm really not sure): I found a quick work-around by modifying nb_test_mediator.rb, here is the small modification : + +require 'rubygems' +begin + gem 'test-unit' + require 'test/unit/version' + puts "Test-unit version : #{Test::Unit::VERSION} loaded" +rescue Gem::LoadError => e + puts 'Test-unit gem not found, falling back to default test-unit' +end require 'test/unit' require 'test/unit/testcase' require 'test/unit/testsuite' require 'test/unit/ui/testrunnermediator' require 'getoptlong' -require 'rubygems' require 'rake' require File.join(File.expand_path(File.dirname(__FILE__)), "nb_suite_runner")
Thanks a lot for the patch, I think that is the correct fix for this. I'll give it a try and integrate to trunk then.
Fixed in 794160f89154, thanks once again.
Integrated into 'main-golden', will be available in build *200910070250* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/794160f89154 User: Erno Mononen <emononen@netbeans.org> Log: #173705: Unable to use the gem test-unit 2.0.x - special thanks to ehartmann for the patch