[rspec-users] specing send_file

vo.x
Fri, 20 Feb 2009 22:45:29 -0000

Hello everybody!

Im wondering what is the best way of specing action with send file
such as:

  def download
    log = ActivityLog.find(params[:id])
    if log
      send_file log.path
    else
      flash[:notice] = _("Log file \"#{params[:id]}\" was not
found.")
      redirect_to :action => ''index''
    end
  end

You can see that the ActivityLog class is not inherited from AR and
the path dependes on specified ID.

Thank you in advance.

Vit