attaches_file fails in rspec story
Reported by Bart Zonneveld | August 29th, 2008 @ 05:25 AM
Hello all,
I have a story with the following step in it:
When "I attach '$file'" do |file|
attaches_file "Attachment", RAILS_ROOT + "/spec/fixtures/#{file}.jpg"
end
When I run that story, I get the following error:
Processing CommentsController#create (for 127.0.0.1 at
2008-08-29 11:20:34) [POST] Parameters:
{"comment"=>{"comment"=>"Foo",
"new_upload_attributes"=>["/Users/bartz/Documents/workspace/beetlejuice.omroep.nl/trunk/spec/fixtures/file.jpg"]},
"commit"=>"Save", "project_id"=>"53", "action"=>"create",
"controller"=>"comments"} /!\ FAILSAFE /!\ vr 29 augustus 2008,
11:20 Status: 500 Internal Server Error undefined method
stringify_keys!' for #<String:0x2583610>
I'm using Paperclip in my model, like this:
class Comment; has_many uploads; end class Upload; has_attached_file :file; end
Comments and changes to this ticket
-
Bart Zonneveld November 16th, 2008 @ 07:55 PM
Ugh, backtrace with nice formatting:
Processing CommentsController#create (for 127.0.0.1 at 2008-08-29 11:20:34) [POST] Parameters: {"comment"=>{"comment"=>"Foo", "new_upload_attributes"=>["/Users/bartz/Documents/workspace/beetlejuice.omroep.nl/trunk/spec/fixtures/beetlejuice.jpg"]}, "commit"=>"Save", "project_id"=>"53", "action"=>"create", "controller"=>"comments"} /!\ FAILSAFE /!\ vr 29 augustus 2008, 11:20 Status: 500 Internal Server Error undefined method `stringify_keys!' for #<String:0x2583610> -
-
Bart Zonneveld November 17th, 2008 @ 02:06 AM
Could very well be the case, I don't remember anymore :). Ticket may be closed.
-
Bryan Helmkamp November 17th, 2008 @ 08:43 AM
- → State changed from new to out-of-date
Hey Bart,
Sorry for the long turn around time on this. I promise to be respond much quicker to any future tickets.
Cheers,
-Bryan
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Ruby Acceptance Testing for Web applications
