[rspec-users] Attachment-fu + Story Runner
luislavena at gmail.com
Tue Dec 11 09:39:22 EST 2007
On Dec 11, 2007 10:57 AM, Daniel Tenner <daniel.ruby at tenner.org> wrote:
> I've pasted up the code at:
> Since there are quite a few files involved.
> Thanks for your time,
A similar discussion was raised back in november (about fixture_file_upload):
Instead of mocking the FileUpload, why not provide a real one?
After all, the StoryRunner is aimed to fully exercise your code :-D
Also, adjust the path of your TestFileUpload file location, instead of
a relative one (../spec/fixtures) provide one related to RAILS_ROOT,
which will work no matter where you put your helper or what is your
current directory (Dir.chdir).
A common mistake that people make when trying to design
something completely foolproof is to underestimate
the ingenuity of complete fools.
More information about the rspec-users