I can confirm this, i've also experienced this problem previously, i just add a quick and dirty fix by requiring the file in myself ... and has forgotten abt this issue since then.
== On Wed, Dec 17, 2008 at 11:18 PM, Garry Hill <[email protected]> wrote: > > 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. > > > > -- http://ngty77.blogspot.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
