Spec-Zone.ru › Ruby / Rack

class TestControllerTest

Public Instance Methods

test_empty_body () Show source
# File test.rb, line 58
def test_empty_body
  get "/empty"
  assert_response 200
  assert_equal '0', headers['content-length']
  # assert headers.key?('content-length')
end

works on rack 3.0 content-length key is missing on rack 3.1

test_head () Show source
# File test.rb, line 49
def test_head
  get "/head"
  assert_response 200
  assert_equal '0', headers['content-length']
  # assert headers.key?('content-length')
end

works on rack 3.0 content-length key is missing on rack 3.1

test_with_body () Show source
# File test.rb, line 66
def test_with_body
  get "/body"
  assert_response 200
  assert_equal '1', headers['content-length']
end

works on rack 3.0 and 3.1

© 2007-2021 Leah Neukirchen
Licensed under the MIT License.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API