I have a controller which is responsible for accepting JSON files and then processing the JSON files to do some user maintenance for our application. In user testing the fil
If you are using default rails test with factory girl. Fine below code.
factory :image_100_100 do image File.new(File.join(::Rails.root.to_s, "/test/images", "100_100.jpg")) end
Note: you will have to keep an dummy image in /test/images/100_100.jpg.
/test/images/100_100.jpg
It works perfectly.
Cheers!