Displaying 1 result from an estimated 1 matches for "less_than_100".
2011 Aug 31
5
3.1rc8 - posting files in a test no longer works
A previously working test, that posted a file object no longer works
in the latest 3.1. The test looks like this:
params[:media][:new_attachment] = File.open("#{Rails.root}/test/data/
less_than_100.png")
post :create, params
In the controller, I obviously expect params[:media][:new_attachment]
to be a File object - and it used to be. Now it looks like #inspect
has been called on the file. Debugging out in the test:
(rdb:1) params[:media].try(:[], :new_attachment)
"#<File:0x00...