Hi,
I''m trying to write a functional test to a model that has
attachment_fu:
{{{
fdata = fixture_file_upload(fname,''application/octet-stream'')
post url_for(:controller=>:support_files, :action=>:create),
:session=>session, :project_id=>project_id,
:support_file=>{''uploaded_data''=>fdata},
:format=>''xml''
}}}
The log file shows:
{{{
NoMethodError (undefined method `content_type'' for
"#<ActionController::TestUploadedFile:0x4376938>":String):
/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:
255:in `uploaded_data=''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:1672:in `send''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:1672:in `attributes=''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:1671:in `each''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:1671:in `attributes=''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:1505:in `initialize_without_callbacks''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/callbacks.rb:225:in `initialize''
}}}
The strange this is, when it runs with file updates from a browser,
this all works just fine.
Any ideas?
Thanks,
Helzer
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---