Shrine

Possible to use Shrine::Storage::Memory in system tests?

Hi!

I use Shrine::Storage::Memory in test environment. In my system tests I saw, this generates image URLs like memory://images/foo...bar.jpg. This URLs are broken!? I want to use screenshot comparing in my tests. Localy with Capybaras screenshot functionality and with Percy. This won’t function with broken image tags.

Is it somehow possible to access these images in memory within the selenium driven browser? I want to keep the memory storage because of the speed improvement. Or did I have to switch to filesystem storage?

Thank you!

You can use the download_endpoint plugin to serve the images from memory storage. That would require you to replace the file links in test environment.

Ah ok! Thank you for the tip! I will give this a try!