Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't talk to server during tests #23

Closed
shawndrost opened this issue Jul 7, 2012 · 3 comments
Closed

Don't talk to server during tests #23

shawndrost opened this issue Jul 7, 2012 · 3 comments

Comments

@shawndrost
Copy link

Carrierwave's docs specify to do the following to speed up tests:

if Rails.env.test? or Rails.env.cucumber?
  CarrierWave.configure do |config|
    config.storage = :file
    config.enable_processing = false
  end
end

This doesn't work if you have include Cloudinary::CarrierWave in your uploader.

Thanks!

TalLevAmi added a commit that referenced this issue Jul 8, 2012
@nadavs
Copy link
Contributor

nadavs commented Jul 12, 2012

This was fixed and included since v1.0.29 of Cloudinary GEM.
Setting 'config.storage = :file' does not have any effect, but setting enable_processing to false prevents uploading to Cloudinary or eagerly generating transformed versions.

@nadavs nadavs closed this as completed Jul 12, 2012
@mull
Copy link

mull commented Jul 22, 2013

@nadavs could you provide an example of setting enable_processing to false?

@nadavs
Copy link
Contributor

nadavs commented Jul 22, 2013

You can set enable_processing to false using CarrierWave.configure:

if Rails.env.test? or Rails.env.cucumber?
  CarrierWave.configure do |config|
    config.enable_processing = false
  end
end

For more details see: https://github.com/carrierwaveuploader/carrierwave#testing-with-carrierwave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants