test problem

Hi everyone,

I ran into some problems during testing. The problem was like:

ruby test/unit/game_test.rb

/usr/lib/ruby/1.8/test/unit/assertionfailederror.rb:7: Test is not a
module (TypeError)
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from /home/gaoxh04/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:158:in `require'
  from /usr/lib/ruby/1.8/test/unit/assertions.rb:5
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from /home/gaoxh04/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:158:in `require'
  from /usr/lib/ruby/1.8/test/unit/testcase.rb:7
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from /home/gaoxh04/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:158:in `require'
  from /usr/lib/ruby/1.8/test/unit.rb:1
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from /home/gaoxh04/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:158:in `require'
  from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/test_help.rb:5
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from /home/gaoxh04/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:158:in `require'
  from ./test/unit/../test_helper.rb:3
  from test/unit/game_test.rb:1:in `require'
  from test/unit/game_test.rb:1

My game_test.rb is really simple:

Xiahong,

The message "Test is not a module" is the error you want to address.

I'd check that your test helper doesn't have "include Test" or maybe
Test.module_eval someplace in it.

:S

sorry, i didn’t get it… how can i fix this problem?

I have fixed this problem. This is related to the issue that I tried to name some classes with reserved name “test”. Thanks all!!