Skip to content

Instantly share code, notes, and snippets.

@mariovisic
Created June 28, 2011 01:29
Show Gist options
  • Select an option

  • Save mariovisic/1050282 to your computer and use it in GitHub Desktop.

Select an option

Save mariovisic/1050282 to your computer and use it in GitHub Desktop.
# Speeds up testing Carrier Wave by turning off uneccessary processing
if Rails.env.test?
CarrierWave.configure do |config|
config.storage = :file
config.enable_processing = false
config.root = Rails.root.join('spec', 'support', 'uploads')
end
end
RSpec.configure do |config|
# Remove all uploaded files after testing
config.after :all do
FileUtils.rm_rf Rails.root.join('spec', 'support', 'uploads')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment