[rspec-users] uploads with webrat in stories

Jonathan Linowes jonathan at parkerhill.com
Fri Aug 29 12:17:54 EDT 2008


I've read through the messages on this list, and have file upload  
specs working in my model and controller tests, using :file =>  
ActionController::TestUploadedFile.new(filepath)

But its not working in stories using webrat. I've tried

	fills_in "foo[file]", :with => filepath
and
	fills_in "foo[file]", :with => ActionController::TestUploadedFile.new 
(filepath)

both fail (0) when submit
	clicks_button 'Update'

oddly, in either case, a browser get opened, with something like  
file:///Users/jonathan/rails/myproject/tmp/webrat-1220026536.html  
which is blank

suggestions?

thx
linoj



More information about the rspec-users mailing list