Download spec/support/cloudinary_helpers.rb from denise-oneill-inbox-ru/Rails-8-API-Image-Processing: direct link, hf CLI and curl.
- Browser
- Download file 320 Bytes
-
https://huggingface.co/spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/resolve/main/spec/support/cloudinary_helpers.rb
- Command line
-
hf download hf://spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/spec/support/cloudinary_helpers.rb
-
curl -L -o cloudinary_helpers.rb https://huggingface.co/spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/resolve/main/spec/support/cloudinary_helpers.rb
320 Bytes
| module CloudinaryHelpers | |
| def stub_cloudinary_requests | |
| allow(Cloudinary::Utils).to receive(:cloudinary_url) do |public_id, **options| | |
| "https://res.cloudinary.com/test/image/upload/#{options[:transformations]}/#{public_id}" | |
| end | |
| end | |
| end | |
| RSpec.configure do |config| | |
| config.include CloudinaryHelpers | |
| end | |