On Sep 2, 4:33 am, Allen
<allen.w...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> 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?
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
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.