Blog

Saturday 09 May 2009

Cucumber + Paperclip

I just spent an inordinately long time trying to figure out how to get Cucumber tests to create records with Paperclip files attached. Those of you with an equally troglodytic IQ may thus find this snippet useful. The idea here, which is probably obvious, is that I have an upload-files folder in my Cucumber features folder in the root of the Rails application. I put the required sample files there. Be warned that this is actually saving the files to your public folder and they w... More