> Rails 3.1 enforces that parameters should look like what you'll > actually get in a test - you used to be able to stick arbitrary > objects in there which of course doesn't reflect what happens in the > real world. > fixture_file_upload should still work
I have a similar problem. Until now I used to assign a ActionDispatch::Http::UploadedFile to my parameter, which now doesn't work anymore in rails 3.1. Unfortunately I cannot use fixture_file_upload because it creates a Rack::Test::UploadedFile, which doesn't provide #tempfile: irb> params[:file].class => Rack::Test::UploadedFile irb> params[:file].tempfile NoMethodError: undefined method `tempfile' for #<Tempfile:0xb6591b70> There already is a bug report about this problem with fixture_file_upload: https://github.com/rails/rails/issues/799 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

