Sha256: 02afed6c2c600914716de657dfde4dae2d344581ae7d55a3fbf3461a55950db7

Contents?: true

Size: 454 Bytes

Versions: 8

Compression:

Stored size: 454 Bytes

Contents

require File.expand_path('../../../helper', __FILE__)

class SpecSendFile
  include Innate::Node
  map '/'

  def this
    send_file(__FILE__)
  end
end

describe Innate::Helper::SendFile do
  should 'send __FILE__' do
    got = Innate::Mock.get('/this')

    got.body.should == File.read(__FILE__)
    got.status.should == 200
    got['Content-Length'].should == File.size(__FILE__).to_s
    got['Content-Type'].should == 'text/x-script.ruby'
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
manveru-innate-2009.07 spec/innate/helper/send_file.rb
innate-2010.07 spec/innate/helper/send_file.rb
innate-2010.06.18 spec/innate/helper/send_file.rb
innate-2010.04 spec/innate/helper/send_file.rb
innate-2010.03 spec/innate/helper/send_file.rb
innate-2010.01 spec/innate/helper/send_file.rb
innate-2009.10 spec/innate/helper/send_file.rb
innate-2009.07 spec/innate/helper/send_file.rb