My controller accesses the tempfile attribute of an uploaded file and passes it to another mocked component. My test code has
tempfile
@file = mock(Object)
I made a pull request to fix this issue, please +1 if you like it: https://github.com/brynary/rack-test/pull/67