Using plugin :uppy_s3_multipart in a test suite

Hi all

was wondering how you folks use the multi-part plugin while running tests:

shrine initialiser

case Rails.env
when “test”
require “shrine/storage/memory”

Shrine.storages = {
cache: “cache”),
store: “uploads”),
Shrine.plugin :uppy_s3_multipart

But this is set to explicitly fail in the tests:

Was wondering how to include the uppy_s3_multipart plugin AND have all the tests pass while using Shrine::Storage::Memory?

Any advice would be much appreciated.

You could use aws-sdk-s3 stubs, examples of which you can see in client_test.rb or in Shrine’s s3_test.rb.

1 Like