Sha256: 24a29aa3e4c7a7cc26d602cebc8a802b0b4f6225a9dcd2a06d33de770af353b0
Contents?: true
Size: 818 Bytes
Versions: 2
Compression:
Stored size: 818 Bytes
Contents
# encoding: UTF-8 require 'simplecov' and SimpleCov.start do add_filter "spec/" end require 'mojito' describe Mojito::Rendering::File do subject do Mojito.base_application Mojito::Rendering::File do file! __FILE__ end.mock_request end it { subject.get('/').status.should == 200 } it { subject.get('/').headers.should include('Content-Type') } it { subject.get('/').headers['Content-Type'].should == 'application/x-ruby' } it { subject.get('/').headers.should include('Content-Length') } it { subject.get('/').headers['Content-Length'].should == ::File.size(__FILE__).to_s } it { subject.get('/').headers.should include('Last-Modified') } it { subject.get('/').headers['Last-Modified'].should == ::File.mtime(__FILE__).rfc2822 } it { subject.get('/').body.should == ::File.read(__FILE__) } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mojito-0.1.2 | spec/mojito/rendering/file_spec.rb |
mojito-0.1.1 | spec/mojito/rendering/file_spec.rb |