I upgraded a working app from rails 2.1 to 2.3.2. Now when I run rake
test:units I get this error: /usr/lib/ruby/gems/1.8/gems/
activesupport-2.3.2/lib/active_support/test_case.rb:17: superclass
mismatch for class TestCase (TypeError)

I generated a new test app and all tests run OK.

For the upgrade I ran rake:update and renamed the class in test_helper
to ActiveSupport::TestCase. Also renamed the classes in all unit tests
and to inherit from ActiveSupport::TestCase and in functional tests to
inherit from ActionController::TestCase.
I still could not fix it this error. I compared line by line the
config files and the test_helper.rb with a brand new app and there are
almost the same. Google didn't provide any clue.

Full stack trace here:

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/
test_case.rb:17: superclass mismatch for class TestCase (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 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:158:in `require'
        from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/
action_controller/test_case.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 /usr/lib/ruby/gems/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:6
        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 /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:158:in `require'
        from /home/costi/workspace/r2rrails/test/test_helper.rb:3
        from ./test/unit/customer_test.rb:1:in `require'
        from ./test/unit/customer_test.rb:1
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/
rake_test_loader.rb:5:in `load'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/
rake_test_loader.rb:5
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/
rake_test_loader.rb:5:in `each'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/
rake_test_loader.rb:5
rake aborted!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to