1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Quelch all warnings from static test.

This commit is contained in:
Vipul A M 2014-03-28 12:09:42 +08:00
parent 8b39bbdd2d
commit 954d813f94

View file

@ -18,7 +18,7 @@ class StaticTest < Test::Unit::TestCase
it 'produces a body that can be iterated over multiple times' do it 'produces a body that can be iterated over multiple times' do
env = Rack::MockRequest.env_for("/#{File.basename(__FILE__)}") env = Rack::MockRequest.env_for("/#{File.basename(__FILE__)}")
status, headers, body = @app.call(env) _, _, body = @app.call(env)
buf1, buf2 = [], [] buf1, buf2 = [], []
body.each { |part| buf1 << part } body.each { |part| buf1 << part }
body.each { |part| buf2 << part } body.each { |part| buf2 << part }
@ -28,7 +28,7 @@ class StaticTest < Test::Unit::TestCase
it 'sets the sinatra.static_file env variable if served' do it 'sets the sinatra.static_file env variable if served' do
env = Rack::MockRequest.env_for("/#{File.basename(__FILE__)}") env = Rack::MockRequest.env_for("/#{File.basename(__FILE__)}")
status, headers, body = @app.call(env) @app.call(env)
assert_equal File.expand_path(__FILE__), env['sinatra.static_file'] assert_equal File.expand_path(__FILE__), env['sinatra.static_file']
end end
@ -192,7 +192,7 @@ class StaticTest < Test::Unit::TestCase
it 'does not include static cache control headers by default' do it 'does not include static cache control headers by default' do
env = Rack::MockRequest.env_for("/#{File.basename(__FILE__)}") env = Rack::MockRequest.env_for("/#{File.basename(__FILE__)}")
status, headers, body = @app.call(env) _, headers, _ = @app.call(env)
assert !headers.has_key?('Cache-Control') assert !headers.has_key?('Cache-Control')
end end