Sha256: 4ff81dcb195cf63a7803234b4872eed0e68f265c45f3b0afa4df88d53277eece

Contents?: true

Size: 829 Bytes

Versions: 14

Compression:

Stored size: 829 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rspeckled-1.0.3 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-1.0.2 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-1.0.1 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-1.0.0 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.64 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.63 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.62 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.61 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.60 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.59 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.58 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.57 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.56 lib/rspeckled/plugins/carrier_wave.rb
rspeckled-0.0.55 lib/rspeckled/plugins/carrier_wave.rb