Topic: Functional Test and File Upload

I'm trying to integrate file uploads into a functional test. I currently have:

test "create valid person" do
  post(:create, :person => { :avatar => fixture_file_upload('avatar.jpeg') })
end

Which results in params[:person][:avatar] being of type Tempfile. Testing in the browser results in params[:person][:avatar] being of type ActionDispatch::Http::UploadedFile. Thus the two are not equivalent.

How can I get my test to perform the same as in the browser?