1

I'm using refile gem and wanna test the uploader with rspec. Since I'm using refile only for one model in the app I wanna avoid requiring it in rails_helper. If I try to require it as you see below then I will get require': cannot load such file -- refile/file_double (LoadError) error. What should I do?

rails_helper.rb

require 'devise'
require "pundit/rspec"
require 'capybara/rails'
require 'capybara/poltergeist'

spec/models/company_spec.rb

require 'rails_helper'
require 'refile/file_double'
Sean Magyar
  • 2,360
  • 1
  • 25
  • 57

0 Answers0