Last Updated: March 01, 2018
·
1.69K
· lucianosousa

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