This project is archived and is in readonly mode.
no such file to load test_helper
-
Henrik Hodne
Try
ruby -Itest test/unit/city_test.rb. The top line should berequire "test_helper". The-Itestadds the test directory to the load path. -
Rohit Arondekar
- State changed from new to invalid
- Importance changed from to Low
If Henrik's advice doesn't work, make a comment and I'll reopen.
-
David Morton
Why is this invalid? This fails for me too:
cd test ruby unit/user_test.rb <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- test_helper (LoadError)According to http://guides.rubyonrails.org/testing.html#running-tests this should work, but I have to add
-I.to make that work. What changed? -
Rohit Arondekar
- State changed from invalid to open
It won't work without the -I because test is not in the load path. To add it to the load path you need to use -Itest. The error is quite self explanatory, it can't find the file test_helper — it's because test is not in the load path.
However I think now the docs need fixing. I'll see what I can do. Thanks David.
-
Rohit Arondekar
- State changed from open to resolved
Guide edited here http://github.com/lifo/docrails/commit/3683745cbc94a60e1cf60d86c9cb...
This will merged with the main Rails repo after review later.