So, I finally realized I could accomplish this by setting ENV['FIXTURES_PATH'], but it took me a while to realize this.
I submitted the following PR to make this "just work" for users of rspec + fixtures. https://github.com/rails/rails/pull/27432 Thanks, -- Chad On Thu, Nov 24, 2016 at 7:46 PM, Chad Woolley <[email protected]> wrote: > I usually keep my fixtures in `spec/fixtures`. > > In order for `rake db:fixtures:load` to work, I've always had to symlink > `test/fixtures` to point to `spec/fixtures`. > > I was trying to avoid this in a new Rails 5 project, but I could see any > way to (even monkey patching `ActiveSupport::TestCase#fixture_path` > didn't work). > > I realize rspec-rails allows you to set it via `config.fixture_path`, but > this doesn't help when doing `db:fixtures:load`, which is dev env. > > Ideally, I'd like to do something like this in `config/development.rb`: > > ` config.active_record.fixture_path = "#{::Rails.root}/spec/fixtures"` > > Am I missing something obvious? If not, what do you think about a patch > to support the above line? > > Thanks, > -- Chad > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.
