[rspec-users] uploads with webrat in stories

Chong kee Tan lists at ruby-forum.com
Mon Nov 8 19:35:09 EST 2010

In case there are other people trying to do the same thing, webrat's
implementation of attach_file has changed somewhat. See this URL for the
current method to attach a file in your multipart form:


To summarize, syntax is
attach_file (field_locator, path, content_type = nil)

There is no need to call File.join or File.open, just specify the
relative path.

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list