reset values to test with default value (#453)

This commit is contained in:
Hirofumi Shibata 2018-06-18 21:07:54 +09:00 committed by Serdar Dogruyol
parent 58bf05b8b1
commit f916bad095
2 changed files with 4 additions and 5 deletions

View file

@ -2,13 +2,11 @@ require "./spec_helper"
describe "Config" do
it "sets default port to 3000" do
config = Kemal.config
config.port.should eq 3000
Kemal::Config.new.port.should eq 3000
end
it "sets default environment to development" do
config = Kemal.config
config.env.should eq "development"
Kemal::Config.new.env.should eq "development"
end
it "sets environment to production" do
@ -18,7 +16,7 @@ describe "Config" do
end
it "sets default powered_by_header to true" do
Kemal.config.powered_by_header.should be_true
Kemal::Config.new.powered_by_header.should be_true
end
it "sets host binding" do

View file

@ -54,6 +54,7 @@ module Kemal
end
def clear
@powered_by_header = true
@router_included = false
@handler_position = 0
@default_handlers_setup = false