On Jun 1, 5:43 pm, Matt Wynne <
m...@mattwynne.net> wrote:
> On 1 Jun 2009, at 15:24, Toms Mikoss wrote:
>
>
>
>
>
> > Hello,
> > I've run into a problem with writing a feature test for downloading
> > files.
> > The idea is - user goes to bills page, clicks link next to a bill,
> > gets that bill in .pdf. Everything is okay up to the very last point -
> > checking what the application returns after clicking the download
> > link. After following the link, the 'response' object still contains
> > the original page with the link, not the returned file as I would have
> > liked. Is there some other object specially for returned files? Or
> > what?
>
> > What I have in the controller:
> > respond_to do |format|
> > format.pdf do
> > send_file(@bill.file,
> > :disposition => 'attachment',
> > :type => 'application/pdf',