On Jan 21, 2008 11:36 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Jan 21, 2008 2:12 PM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > > I'm trying to write a story for a Rails app which involves using the > > attachment_fu plugin to upload images. > > > > After blunting my pick on this for a while, google found me this: > > http://www.ruby-forum.com/topic/134743#600831 > > > > So it seems that there's a hole in Rails integration testing and > > multipart form posting. David offered to incorporate a patch to story > > runner at the end of the reference thread in ruby-talk, although just > > which patch confuses me, it would seem to be one from > > http://dev.rubyonrails.org/ticket/4635 > > > > So what is the current status here? > > "There are no tests for the rails patch. If you're willing to add > rspec examples and contribute it to the rspec tracker, I'll add it to > rspec as a temporary fix until that ticket is resolved." > > I think that's where we left it. > > Probably belongs in a separate plugin though - not as part of rspec. Any > takers?
After looking at the patches a bit, I decided to dig in and write a new rails patch which will work slightly differently. The current patch explicitly requires the use of a multi_part method. The problem is that this doesn't work if you want to use, say post_via_redirect, and it also doesn't handle multipart put requests, which just might be useful in our RESTful world these days. So instead I'm now debugging a new patch which adds the ability for an integration controller to detect parameter values which are instances of TestUploadedFile and automatically generate a multipart request. In the meantime, I seem to be running into the issue discussed here: http://www.ruby-forum.com/topic/130975#585329 I find I need to have this: Test::Unit::TestCase.fixture_path = RAILS_ROOT + '/spec/fixtures/' I thought that this was fixed? $ svn propget piston:root vendor/plugins/rspec http://rspec.rubyforge.org/svn/tags/CURRENT/rspec $ svn propget piston:root vendor/plugins/rspec_on_rails http://rspec.rubyforge.org/svn/tags/CURRENT/rspec_on_rails $ svn propget piston:remote-revision vendor/plugins/rspec 3225 $ svn propget piston:remote-revision vendor/plugins/rspec_on_rails/ 3223 -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users