Extract default app behavior from Kemal::Base to Kemal::Application

This commit is contained in:
Johannes Müller 2017-07-17 18:14:26 +02:00 committed by sdogruyol
parent 1cd329b92f
commit f5c80c7b67
5 changed files with 87 additions and 41 deletions

View file

@ -27,11 +27,18 @@ describe "Config" do
config.host_binding.should eq "127.0.0.1"
end
it "adds a custom handler" do
it "adds a custom handler to Base" do
application = Kemal::Base.new
application.add_handler CustomTestHandler.new
application.setup
application.handlers.size.should eq(8)
application.handlers.size.should eq 6
end
it "adds a custom handler to Application" do
application = Kemal::Application.new
application.add_handler CustomTestHandler.new
application.setup
application.handlers.size.should eq 9
end
it "toggles the shutdown message" do