similar to: [Story] passing a file using post

Displaying 20 results from an estimated 300 matches similar to: "[Story] passing a file using post"

2008 Jan 21
3
Story runner "macros"
I''ve gotten quite a bit out of Pat Maddox''s screencast http://evang.eli.st/blog/2007/10/8/story-runner-top-to-bottom-screencast One thing I''m not sure of is the feature where he writes things like: When "I POST to", "/articles", :post => {:title => "Title", :body => "Body") do | path, params| post_via_redirect
2007 Dec 23
0
basic authentication
When I try to get a page via post_via_redirect on a project that uses the new rails 2 http authentication, for example: post_via_redirect path, {:name_of_object => { :att => "test" }}, :authorization => authorize then the post works, but then I''m being redirected to the show action where I''m unauthorized again. A browser doesn''t suffer
2007 Oct 26
1
post_via_redirect - testing problem
I''ve got an integration test that''s failing but i can''t work out why: Here''s the action being tested - in case anyone recognises it, it''s based on the Depot app in Agile Web Dev with Rails. def checkout @in_checkout = true #don''t let user checkout with an empty cart if @cart.items.empty? redirect_to_index("Your cart is
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested. But, I added some code to that model that I do need to test. Basically, I need to somehow fulfill the "uploaded_data" property so I can actually run my tests(otherwise they fail because of validations). The "uploaded_data" field is what would grab the multipart data from form. Here
2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
Basically, I''m trying to crop multiple images out of a remote/original scene.. Think flickr ''tagging'', only, the pixs in the tagged boxes become their own unique images.. by way of simulating an upload from the controller using attachment fu.. can''t quite figure out the specific method in fu that would allow me to do this.. I''m so near the edge right
2012 Nov 12
1
undefined method `original_filename' for nil:NilClass
Hi, although I saw this problem in other blogs, I couldn''t make it works. My view: *<%= semantic_form_for :routes_status_race, :url => status_race_admin_routes_path do |f| %>* * <% contact_array = Contact.all.map {|contact| [contact.name, contact.id]}%>* * <% route_importer_array = RouteImporter.all.map {|importer| [importer.name, importer.id]}%>* * <%=
2008 Jan 21
5
attachment_fu and story runner, any updates
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
2010 Apr 24
2
problem using attachment_fu with S3
Hi, My S3 bucket is located in the US I have attachment_fu working when using file system storage I have sw-swf upload plugin working with my S3 account but I can not get attachment_fu to work with S3 storage. the error I get is : AWS::S3::RequestTimeout in Upload filesController#create Your socket connection to the server was not read from or written to within the timeout period. Idle
2007 Aug 18
0
RSpec and acts_as_attachment
Hey guys, I''m getting a weird error when trying to test something like the following. It''s a model that is using acts_as_attachment but the weird thing is the equivalent Test::Unit case passes. Does anyone have any ideas? Best, Dave # it was a Test::Unit case first def test_should_be_invalid_without_file UserFile.any_instance.expects(:with_image).never
2010 Jul 11
0
Attachement_fu error when updating existing photos
Hi, I am attempting to replace an exiting photo with a new one uploaded by the user. I am using attachment_fu and I am coming up with the following exception: can''t convert nil into String /vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:23:in `join''
2007 Mar 11
4
Faking it... import local files into attachment_fu
Hello, I''m working on an import utility that will match the functionality of uploading an object of a model that uses attachment_fu for thumbnailing, etc. Rather than uploading the file via a form, I want to populate the params[:image][:uploaded_data] with data from a file already on the server''s file system. So far, I''ve been able to copy to an instance of Tempfile
2007 May 22
3
Comments wanted about spec''ing out a couple controller methods
(oops, accidentally sent this to the rspec-devel list, sorry about that) Could someone help me spec out these Rails controller methods? I don''t know where to get started, especially with the transaction stuff. Or, if anyone else could suggest ways I could improve the code, that would be great as well. Puzzle has_one Media. Both are AR model objects. class PuzzlesController <
2007 Dec 08
3
Uploading photos using facebook & attachment_fu
Hi All, I''m trying to use a form to upload a photo that I will save using attachment_fu. I''m very new to Facebookr so I apologize if this is covered somewhere, but I''m kind of stumped. Here''s what I''m doing now: <% facebook_form_for(:my_object, :url => { :action => ''upload_photo'', :id => params[:id] }, :html => {
2007 Aug 14
2
AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
Before I chalk this up as a bug and report it, I just want to make sure I''m not doing something silly. Running ZenTest''s autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the following failed test: ActiveRecord::AssociationTypeMismatch in ''User should create an avatar with uploaded_data'' Avatar expected, got Avatar This only happens with that exact
2008 Feb 04
2
attachment_fu and form_tag for multiple models?
hi, i''ve got a page where i''m trying to save the user''s profile information and an image of the user, but i''m having trouble with using attachment_fu and the form_tag method. now i know attachment_fu isn''t designed for form_tag but am really hoping someone has a solution for this as frankly i''m stumped. here''s the form_tag part in
2008 Jan 17
2
Inconsistent Model creation behavior
Hi, I have a relatively simple Worker: (I added the line numbers to the email, they are not in the worker) ##################################################################################### class ImagetestWorker < BackgrounDRb::MetaWorker set_worker_name :imagetest_worker def create(args = nil) end def save_image(args) @newbook = Book.new @newbook.comment =
2013 Jun 24
0
wrong number of arguments calling `request` (0 for 1) (ArgumentError)
Here is the scenario Scenario: Successful login Given an unauthenticated visitor When visitor goes to /users/login And fills in Email with: amitpandya And fills in Password with: amitpandya And clicks the Login button Then amitpandya should be logged in And page should include a notice with text: Welcome amitpandya And amitpandya should see the home mypage page
2007 Dec 11
14
Attachment-fu + Story Runner
Hi all, I''m trying to run a Story Runner integration test that uploads a file through Attachment-fu. I''ve tried various ways of specifying the file data, from custom mocks: class MockFile < Struct.new (:original_filename, :read, :content_type); end fdata = MockFile.new "test_upload.txt", "Test Upload", "text/plain" to
2007 Dec 31
2
episode 73 resulting in error: undefined method `stringify_keys!' for "33":String
I''m working with a similar model in Episode 73, (my scenario is editing multiple pictures for a product using attachment_fu). And I''m getting an error when I try the technique suggested: ./views/admin/_form.rhtml <% for picture in product.pictures %> <% fields_for "product[picture_attributes][]", picture do | picture_form| %> Title: <%=
2007 Jan 26
0
Problems with assert_select in integration tests
I''ve been battling with assert_select in my integration tests for several evenings now. I''m testing a multi-step form, and after submitting the first step, my assert_selects fail on the attempts to find the form on the next page. However if I print out the response object, it has the exact text of what I''m trying to match. Here is the complete integration test. The