Hi,

I've just been experimenting with integration tests within merb using
webrat.

Things were going really well (it just, sorta, works!) until I tried
to attach a file:

 it "should accept file uploads" do
   @response = request(url(:homepage))
   attach_file('package-file', IMAGE[:path], 'image/jpeg')
   click_button('package-create')
 end


This raises the error:

uninitialized constant Webrat::FileField::ActionController

Looking at the webrat code (core/field.rb:291) this is the culprit:

   def test_uploaded_file
     if content_type
       ActionController::TestUploadedFile.new(@value, content_type)
     else
       ActionController::TestUploadedFile.new(@value)
     end
   end


Obviously this is rails specific. Am I using the wrong method for
integration testing with file uploads?

I'm using merb 1.0.6.1 and webrat 0.3.2.

Thanks in advance,

Garry

p.s. I've been having trouble posting this message, so please forgive
me if it appears more than one time.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to