Skip to content

Instantly share code, notes, and snippets.

@joel
Created July 9, 2012 09:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joel/3075314 to your computer and use it in GitHub Desktop.
Save joel/3075314 to your computer and use it in GitHub Desktop.
Make all factory girl is available in your rails console
# 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