[Rails] can't run unit tests, not even with "ruby -I test"
Trying to run unit test in a new rails 3 project. When I follow
instructions recommended by ruby on rails guides page
(http://guides.rubyonrails.org/testing.html) I get the following:
ruby test/unit/schedule_weekly_test.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to
load -- test_helper (LoadError)
After much googling, everyone seems to recommend that the 'fix' is to
run a test like so:
ruby -I test test/unit/whatever.rb
That it's impossible to run an autogenerated test using the method
recommended on the guides page is pretty annoying. At any rate, when I
run it with -I test, I no longer get the test_helper errors, but I get a
different one:
activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require':
no such file to load -- app/models/users/user (LoadError)
I have a users folder in my model path, that I load with:
config.autoload_paths += %W(/app/model/users)
in application.rb. Any ideas for what I can do to let my tests find the
files within this folder?
--
Posted via http://www.ruby-forum.com/.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home