Rails 3.1.0 File Upload Rspec Test

I’m having this odd problem that I encountered, today. I want to check
that when I upload a CSV file that it does import some records into a
DB. Problem is that sometimes when I run RSpec it seems that it wants
to read the uploaded file as a string, rather than an object that I am
sending with a post request. Here’s a gist of my code:

https://gist.github.com/1187861

With Rails 3.0.10 these specs ALL run without a problem. But with
Rails 3.1.0 it seems to fail for just those 2 specs, but I am confused
because they are basically copied and pasted with each other. So why
is it that sometimes it wants to read this posted object as a String?

On Sep 2, 4:33am, Allen [email protected] wrote:

because they are basically copied and pasted with each other. So why
is it that sometimes it wants to read this posted object as a String?

Earlier versions of rails let you put arbitrary objects in the params
hash, even though in the real world you could never get such params.
Rails 3.1 changes this. One side effect is that you need to use stuff
like fixture_file_upload if you want to send in files

Fred