Sha256: 3f8a37fee731f0d9ab652327357cb5a75de037701262921e842291f3561a44c1

Contents?: true

Size: 1.07 KB

Versions: 32

Compression:

Stored size: 1.07 KB

Contents

##############################################################################
#                             CarrierWave Plugin
##############################################################################

begin
  require 'carrierwave'
  require 'carrierwave/test/matchers'

  RSpec.configure do |config|
    config.include CarrierWave::Test::Matchers, :file_attachment => true
  end

  CarrierWave.configure do |config|
    config.storage           = :file
    config.root              = File.expand_path('./tmp')
    config.enable_processing = false
  end

  RSpec.configure do |config|
    config.around(:each, :file_attachment => true) do |example|
      previous_carrierwave_processing_mode = subject.class.enable_processing
      previous_carrierwave_storage_mode    = subject.class.storage

      subject.class.enable_processing = true
      subject.class.storage           = :file

      example.run

      subject.class.storage           = previous_carrierwave_storage_mode
      subject.class.enable_processing = previous_carrierwave_processing_mode
    end
  end
rescue LoadError
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
rspectacular-0.70.8 lib/rspectacular/plugins/carrier_wave.rb
rspeckled-0.0.16 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.15 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.14 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.13 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.12 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.11 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.10 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.9 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.8 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.7 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.6 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.5 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.4 lib/rspeckled/plugins/carrier_wave.rb
rspectacular-0.70.7 lib/rspectacular/plugins/carrier_wave.rb
rspeckled-0.0.3 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.2 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.1 lib/rspeckled/plugins/carrier_wave.rb
rspectacular-0.70.6 lib/rspectacular/plugins/carrier_wave.rb
rspectacular-0.62.0 lib/rspectacular/plugins/carrier_wave.rb