test/angelo/static_spec.rb in angelo-0.1.9 vs test/angelo/static_spec.rb in angelo-0.1.10
- old
+ new
@@ -25,29 +25,29 @@
last_response.status.must_equal 200
last_response.headers['Content-Type'].must_equal 'text/css'
last_response.headers['Content-Disposition'].must_equal 'attachment; filename=test.css'
last_response.headers['Content-Length'].must_equal '116'
last_response.headers['Etag'].must_equal css_etag
- last_response.body.length.must_equal 116
- last_response.body.must_equal File.read(File.join TEST_APP_ROOT, 'public', 'test.css')
+ last_response.body.to_s.length.must_equal 116
+ last_response.body.to_s.must_equal File.read(File.join TEST_APP_ROOT, 'public', 'test.css')
end
it 'serves headers for static files on head' do
head '/test.css'
last_response.status.must_equal 200
last_response.headers['Content-Type'].must_equal 'text/css'
last_response.headers['Content-Disposition'].must_equal 'attachment; filename=test.css'
last_response.headers['Content-Length'].must_equal '116'
last_response.headers['Etag'].must_equal css_etag
- last_response.body.length.must_equal 0
+ last_response.body.to_s.length.must_equal 0
end
it 'serves static file over route' do
get '/test.html'
last_response.status.must_equal 200
last_response.headers['Content-Type'].must_equal 'text/html'
last_response.headers['Content-Disposition'].must_equal 'attachment; filename=test.html'
- last_response.body.must_equal File.read(File.join TEST_APP_ROOT, 'public', 'test.html')
+ last_response.body.to_s.must_equal File.read(File.join TEST_APP_ROOT, 'public', 'test.html')
end
it 'not modifieds when if-none-match matched etag' do
get '/test.css', {}, {'If-None-Match' => css_etag}
last_response.status.must_equal 304