I have installed both shoulda and factory_girl, I can run shoulda just fine, but when I add this:
require 'factory_girl'
Factory.define :user do |u|
u.mail '[email protected]'
u.pass 'secret'
end
to my test/test_helper.rb I'm getting this error:
/test/test_helper.rb:1:in `require': no such file to load -- factory_girl (LoadError)
when I execute rake test:units
I have installed both gems using:
sudo gem install thoughtbot-shoulda --source=http://gems.github.com sudo gem install thoughtbot-factory_girl --source=http://gems.github.com
and can see both of them being installed fine.
script/console Loading development environment (Rails 2.3.8)
require 'factory_girl' => []
so requiring the gems seems to be working
Couple things to check:
--source=http://gems.github.com
anymore. This has been deprecated in favor for gemcutter.orgsudo gem install factory_girl shoulda
config.gem 'factory_girl'
in your config/environments/test.rb file.