When I run "rake test_units", I get the following error.  Line 8 in  
test_helper.rb is "require ''test/unit''".  Does rake
not know where to
load this module?  Where would that be configured--environment.rb?
ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/ 
rake/rake_test_loader.rb" "test/unit/user_preference_test.rb"
/usr/local/lib/ruby/1.8/test/unit/assertionfailederror.rb:5: Test is  
not a module (TypeError)
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:18:in `require''
         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/ 
lib/active_support/dependencies.rb:200:in `require''
         from /usr/local/lib/ruby/1.8/test/unit/assertions.rb:5
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:18:in `require''
         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/ 
lib/active_support/dependencies.rb:200:in `require''
         from /usr/local/lib/ruby/1.8/test/unit/testcase.rb:5
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:18:in `require''
         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/ 
lib/active_support/dependencies.rb:200:in `require''
         from /usr/local/lib/ruby/1.8/test/unit.rb:11
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:18:in `require''
         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/ 
lib/active_support/dependencies.rb:200:in `require''
         from ./test/unit/../test_helper.rb:8
         from ./test/unit/user_preference_test.rb:1
         from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/ 
rake_test_loader.rb:5
         from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/ 
rake_test_loader.rb:5:in `each''
         from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/ 
rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [ruby -Ilib:test "/usr/local/lib/ruby/ 
gems/...]
Thanks for any help,
Jeff
It looks like the problem I have is that I have a model named "Test", which collides with a module named "Test" in the Ruby libs. Is there a way around this, or should I just re-name my model? thanks, Jeff On Jul 13, 2005, at 2:46 PM, Jeff Cole wrote:> When I run "rake test_units", I get the following error. Line 8 in > test_helper.rb is "require ''test/unit''". Does rake not know where > to load this module? Where would that be configured--environment.rb? > > ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/ > rake/rake_test_loader.rb" "test/unit/user_preference_test.rb" > /usr/local/lib/ruby/1.8/test/unit/assertionfailederror.rb:5: Test > is not a module (TypeError) > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:18:in `require'' > from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/ > lib/active_support/dependencies.rb:200:in `require'' > from /usr/local/lib/ruby/1.8/test/unit/assertions.rb:5 > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:18:in `require'' > from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/ > lib/active_support/dependencies.rb:200:in `require'' > from /usr/local/lib/ruby/1.8/test/unit/testcase.rb:5 > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:18:in `require'' > from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/ > lib/active_support/dependencies.rb:200:in `require'' > from /usr/local/lib/ruby/1.8/test/unit.rb:11 > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:18:in `require'' > from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.1.1/ > lib/active_support/dependencies.rb:200:in `require'' > from ./test/unit/../test_helper.rb:8 > from ./test/unit/user_preference_test.rb:1 > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/ > rake_test_loader.rb:5 > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/ > rake_test_loader.rb:5:in `each'' > from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/ > rake_test_loader.rb:5 > rake aborted! > Command failed with status (1): [ruby -Ilib:test "/usr/local/lib/ > ruby/gems/...] > > > Thanks for any help, > Jeff > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Jeff Cole said:> It looks like the problem I have is that I have a model named "Test", > which collides with a module named "Test" in the Ruby libs. Is > there a way around this, or should I just re-name my model?Yes, Test::Unit is the standard unit test framework that you are actually using for your unit tests :) I would change the name of your model. Ryan