Skip to content

Instantly share code, notes, and snippets.

@thisismydesign
Last active January 26, 2019 17:54
Show Gist options
  • Save thisismydesign/1c965a41f537763b588bd2a082cdff32 to your computer and use it in GitHub Desktop.
Save thisismydesign/1c965a41f537763b588bd2a082cdff32 to your computer and use it in GitHub Desktop.
Ruby: When and how to use factories for seeding? /2
# Gemfile
group :development, :test do
gem 'factory_bot_rails', require: false
end
# For testing:
# spec_helper.rb / rails_helper.rb
require 'factory_bot_rails'
# For other envs, e.g. development
# seeds.rb
require 'factory_bot_rails'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment