How to create a Mock in Ruby On Rails (CarrierWave) to simulate sending image to an S3 (Cloudinary)

2

I've created a project creation system with an image. My images are sent to Cloudinary + CarrierWave.

Before the Test did not break because I sent it to the server, however when I joined the Cloudinary the code broke.

I think I know what it might be, but I do not know how to fix it. When it inserts into the Cloudinary database it returns a random value, as I do for

   **within(".asset_project") do
      expect(page).to have_css("img[src*='project.png']")
   end**

The TDD is correct, as I think it is.

Follow the image of the errors and the code:

    
asked by anonymous 27.11.2014 / 12:04

0 answers