I'm having trouble testing my Rails 3 application. Unit testing
doesn't work. If I try ruby article_test.rb directly, I get a "no
such file to load" error, and if I try rake test:units or ruby unit/
article_test.rb I get this odd "superclass mismatch for class
ArticlesController" error!
I'm hoping I can get this settled...
My test files were generated by the generator...
C:\Users\Family\workspace\jdrampage\test\unit>ruby article_test.rb
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- test_helper
(LoadError)
from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `require'
from article_test.rb:1
C:\Users\Family\workspace\jdrampage\test\unit>cd..
C:\Users\Family\workspace\jdrampage\test>ruby unit/article_test.rb
C:/Users/Family/workspace/jdrampage/app/controllers/
articles_controller.rb:1: superclass mismatch for class
ArticlesController (TypeError)
--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
If you want to run a test directly like this you have to tell it to
include the test directory so it can find the helpers, so from the
root of your app
ruby -I test test/unit/article_test.rb
That is a capital i (for Include)
Colin