Methods
T
Instance Public methods
test_handles_urls_with_bad_encoding()
# File actionpack/test/dispatch/static_test.rb, line 10
def test_handles_urls_with_bad_encoding
  assert_equal "Hello, World!", get("/doorkeeper%E3E4").body
end
test_serves_dynamic_content()
# File actionpack/test/dispatch/static_test.rb, line 6
def test_serves_dynamic_content
  assert_equal "Hello, World!", get("/nofile").body
end
test_serves_static_file_in_directory()
# File actionpack/test/dispatch/static_test.rb, line 27
def test_serves_static_file_in_directory
  assert_html "/foo/bar.html", get("/foo/bar.html")
  assert_html "/foo/bar.html", get("/foo/bar/")
  assert_html "/foo/bar.html", get("/foo/bar")
end
test_serves_static_file_with_ampersand_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 53
def test_serves_static_file_with_ampersand_in_filename
  with_static_file "/foo/foo&bar.html" do |file|
    assert_html file, get("/foo/foo%26bar.html")
    assert_html file, get("/foo/foo&bar.html")
  end
end
test_serves_static_file_with_apostrophe_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 60
def test_serves_static_file_with_apostrophe_in_filename
  with_static_file "/foo/foo'bar.html" do |file|
    assert_html file, get("/foo/foo%27bar.html")
    assert_html file, get("/foo/foo'bar.html")
  end
end
test_serves_static_file_with_asterisk()
# File actionpack/test/dispatch/static_test.rb, line 111
def test_serves_static_file_with_asterisk
  with_static_file "/foo/foo*bar.html" do |file|
    assert_html file, get("/foo/foo%2Abar.html")
    assert_html file, get("/foo/foo*bar.html")
  end
end
test_serves_static_file_with_at_symbol_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 95
def test_serves_static_file_with_at_symbol_in_filename
  with_static_file "/foo/foo@bar.html" do |file|
    assert_html file, get("/foo/foo%40bar.html")
    assert_html file, get("/foo/foo@bar.html")
  end
end
test_serves_static_file_with_colon()
# File actionpack/test/dispatch/static_test.rb, line 104
def test_serves_static_file_with_colon
  with_static_file "/foo/foo:bar.html" do |file|
    assert_html file, get("/foo/foo%3Abar.html")
    assert_html file, get("/foo/foo:bar.html")
  end
end
test_serves_static_file_with_comma_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 81
def test_serves_static_file_with_comma_in_filename
  with_static_file "/foo/foo,bar.html" do |file|
    assert_html file, get("/foo/foo%2Cbar.html")
    assert_html file, get("/foo/foo,bar.html")
  end
end
test_serves_static_file_with_dollar_sign_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 46
def test_serves_static_file_with_dollar_sign_in_filename
  with_static_file "/foo/foo$bar.html" do |file|
    assert_html file, get("/foo/foo%24bar.html")
    assert_html file, get("/foo/foo$bar.html")
  end
end
test_serves_static_file_with_exclamation_mark_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 39
def test_serves_static_file_with_exclamation_mark_in_filename
  with_static_file "/foo/foo!bar.html" do |file|
    assert_html file, get("/foo/foo%21bar.html")
    assert_html file, get("/foo/foo!bar.html")
  end
end
test_serves_static_file_with_parentheses_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 67
def test_serves_static_file_with_parentheses_in_filename
  with_static_file "/foo/foo(bar).html" do |file|
    assert_html file, get("/foo/foo%28bar%29.html")
    assert_html file, get("/foo/foo(bar).html")
  end
end
test_serves_static_file_with_plus_sign_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 74
def test_serves_static_file_with_plus_sign_in_filename
  with_static_file "/foo/foo+bar.html" do |file|
    assert_html file, get("/foo/foo%2Bbar.html")
    assert_html file, get("/foo/foo+bar.html")
  end
end
test_serves_static_file_with_semi_colon_in_filename()
# File actionpack/test/dispatch/static_test.rb, line 88
def test_serves_static_file_with_semi_colon_in_filename
  with_static_file "/foo/foo;bar.html" do |file|
    assert_html file, get("/foo/foo%3Bbar.html")
    assert_html file, get("/foo/foo;bar.html")
  end
end
test_serves_static_index_at_root()
# File actionpack/test/dispatch/static_test.rb, line 20
def test_serves_static_index_at_root
  assert_html "/index.html", get("/index.html")
  assert_html "/index.html", get("/index")
  assert_html "/index.html", get("/")
  assert_html "/index.html", get("")
end
test_serves_static_index_file_in_directory()
# File actionpack/test/dispatch/static_test.rb, line 33
def test_serves_static_index_file_in_directory
  assert_html "/foo/index.html", get("/foo/index.html")
  assert_html "/foo/index.html", get("/foo/")
  assert_html "/foo/index.html", get("/foo")
end
test_sets_cache_control()
# File actionpack/test/dispatch/static_test.rb, line 14
def test_sets_cache_control
  response = get("/index.html")
  assert_html "/index.html", response
  assert_equal "public, max-age=60", response.headers["Cache-Control"]
end