Report abuse


			
  def ping
    video = Video.find( :first, :conditions => [ "media_id = ?",  params[ 'video_id' ] ] )
    if params[ :filename ] =~ /(.flv)/
      video.flv_encoded = true
      video.get_image( params[ :encoded_video_id ] )
    end
    video.mp4_encoded = true if params[ :filename ] =~ /(.mp4)/
    video.save and video.publish!
    render :nothing => true
  end

these specs...

Video should recieve :find with ... and return yr mock object video then
stub the whatevers on that. and stub that video receives save and publish!
[two specs there, one for save and one for publish!]