Methods
P
S
T
Included Modules
Constants
DummyApp = lambda { |env| [200, {"Content-Type" => "text/plain"}, ["Hello, World!"]] }
 
Instance Public methods
public_path()
# File actionpack/test/dispatch/static_test.rb, line 241
def public_path
  "public"
end
setup()
# File actionpack/test/dispatch/static_test.rb, line 235
def setup
  super
  @root = "#{FIXTURE_LOAD_PATH}/public"
  @app = ActionDispatch::Static.new(DummyApp, @root, "public, max-age=60")
end
test_custom_handler_called_when_file_is_outside_root()
# File actionpack/test/dispatch/static_test.rb, line 247
def test_custom_handler_called_when_file_is_outside_root
  filename = 'shared.html.erb'
  assert File.exist?(File.join(@root, '..', filename))
  env = {
    "REQUEST_METHOD"=>"GET",
    "REQUEST_PATH"=>"/..%2F#{filename}",
    "PATH_INFO"=>"/..%2F#{filename}",
    "REQUEST_URI"=>"/..%2F#{filename}",
    "HTTP_VERSION"=>"HTTP/1.1",
    "SERVER_NAME"=>"localhost",
    "SERVER_PORT"=>"8080",
    "QUERY_STRING"=>""
  }
  assert_equal(DummyApp.call(nil), @app.call(env))
end