Factory girl saving records in my development database

跟風遠走 提交于 2019-12-02 13:18:28

I figured it out. In my Gemfile, I had:

group :development, :test do
  gem 'capybara'
  gem "rspec-rails"
  gem "guard-rspec"
  gem "factory_girl_rails"
  ...
end

I moved factory girl out of this block onto its own line so it is in the test group only like this:

gem 'factory_girl_rails', :group => :test

No more problems

db/Seeds.rb maybe...but I think that only runs on db:reset and db:seed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!