Last active
January 26, 2019 17:54
-
-
Save thisismydesign/1c965a41f537763b588bd2a082cdff32 to your computer and use it in GitHub Desktop.
Ruby: When and how to use factories for seeding? /2
This file contains 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
# 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