I want to test uploading a file in a Rails Rspec request test. I'm using Paperclip for asset storage. I've tried: path = 'path/to/fixture_file' params = { file: Rack::Test::UploadedFile.new(path, 'application/pdf', true) } post v1_product_documents_path, params: params In the controller, I get a string "#Rack::Test::UploadedFile:0x0055b544479128>" instead of the actual file. The same code works in
I recently upgraded to Rails 5.1 from v4.3 and am now getting this error when running tests: An error occurred while loading ./spec/controllers/admin/capacity_charges_controller_spec.rb. Failure/Error: require File.expand_path('../../config/environment', __FILE__) RuntimeError: can't modify frozen Array I get it for every test file. The line that triggers the error comes from rails_helper. I've ch
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く