require 'spec_helper'

describe 'Storing Files', type: :feature do
  it 'uploads the file to the configured bucket' do
    uploader = Class.new(CarrierWave::Uploader::Base) do
      def filename; 'image.png'; end
    end

    image    = File.open('spec/fixtures/image.png', 'r')
    instance = uploader.new

    instance.store!(image)
    instance.retrieve_from_store!('image.png')

    expect(instance.file.size).to be_nonzero
    expect(image.size).to eq(instance.file.size)
  end
end

require 'spec_helper'

describe 'Storing Files', type: :feature do
  it 'uploads the file to the configured bucket' do
    uploader = Class.new(CarrierWave::Uploader::Base) do
      def filename; 'image.png'; end
    end

    image    = File.open('spec/fixtures/image.png', 'r')
    instance = uploader.new

    instance.store!(image)
    instance.retrieve_from_store!('image.png')

    expect(instance.file.size).to be_nonzero
    expect(image.size).to eq(instance.file.size)

    image.close
    instance.file.delete
  end
end

Add cleanup for storing files integration test
Add cleanup for storing files integration test
