RSpec + Carrierwave Controller test example
before do
post :create, params: {
produto: product.attributes.except(:id).merge(
product_image: Rack::Test::UploadedFile.new(Rails.root.join("spec/fixtures/logo.png"))
)
}
end
Written by Luciano Sousa
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#