Created
July 9, 2012 09:21
-
-
Save joel/3075314 to your computer and use it in GitHub Desktop.
Make all factory girl is available in your rails console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mate ~/.irbrc | |
#!/usr/bin/env ruby | |
if defined? Rails | |
begin | |
require 'factory_girl' | |
Dir[Rails.root.join("spec/factories/**/*.rb")].each { |f| require f } | |
rescue LoadError | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment