Skip to content

Instantly share code, notes, and snippets.

@ArturT
Forked from terut/spec_helper.rb
Last active December 23, 2015 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArturT/6556776 to your computer and use it in GitHub Desktop.
Save ArturT/6556776 to your computer and use it in GitHub Desktop.
Use different directory for carrierwave in test environment and clean up after all
RSpec.configure do |config|
# ...
config.after(:all) do
FileUtils.rm_rf(Dir["#{Rails.root}/tmp/test/carrierwave"])
end
end
CarrierWave.configure do |config|
config.root = "#{Rails.root}/tmp/test/carrierwave"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment