Introduce Kemal::InitHandler to initialize HTTP::Server::Context with defaults

This commit is contained in:
Sdogruyol 2016-07-17 18:11:26 +03:00
parent 725e051723
commit 09d9e708f1
10 changed files with 48 additions and 40 deletions

View file

@ -4,7 +4,7 @@ describe "Macros" do
describe "#basic_auth" do
it "adds HTTPBasicAuthHandler" do
basic_auth "serdar", "123"
Kemal.config.handlers.size.should eq 5
Kemal.config.handlers.size.should eq 6
end
end
@ -18,7 +18,7 @@ describe "Macros" do
describe "#add_handler" do
it "adds a custom handler" do
add_handler CustomTestHandler.new
Kemal.config.handlers.size.should eq 5
Kemal.config.handlers.size.should eq 6
end
end