I want the Seeds.rb file to run a method in a file from the Rails.root.join('spec') directory, which populates the database with the data created by FactoryGirl. Lets call this file "helpers.rb" with the "seed_data" method
Edit: require Rails.root.join('spec','helpers.rb') links the file. a source
This method, which I want to use in before(:all) do seed_data end , to sow test database and rake db:seed for development / production databases with the same effect.
source share