mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	reset values to test with default value (#453)
This commit is contained in:
		
							parent
							
								
									58bf05b8b1
								
							
						
					
					
						commit
						f916bad095
					
				
					 2 changed files with 4 additions and 5 deletions
				
			
		|  | @ -2,13 +2,11 @@ require "./spec_helper" | ||||||
| 
 | 
 | ||||||
| describe "Config" do | describe "Config" do | ||||||
|   it "sets default port to 3000" do |   it "sets default port to 3000" do | ||||||
|     config = Kemal.config |     Kemal::Config.new.port.should eq 3000 | ||||||
|     config.port.should eq 3000 |  | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   it "sets default environment to development" do |   it "sets default environment to development" do | ||||||
|     config = Kemal.config |     Kemal::Config.new.env.should eq "development" | ||||||
|     config.env.should eq "development" |  | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   it "sets environment to production" do |   it "sets environment to production" do | ||||||
|  | @ -18,7 +16,7 @@ describe "Config" do | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   it "sets default powered_by_header to true" do |   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 |   end | ||||||
| 
 | 
 | ||||||
|   it "sets host binding" do |   it "sets host binding" do | ||||||
|  |  | ||||||
|  | @ -54,6 +54,7 @@ module Kemal | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     def clear |     def clear | ||||||
|  |       @powered_by_header = true | ||||||
|       @router_included = false |       @router_included = false | ||||||
|       @handler_position = 0 |       @handler_position = 0 | ||||||
|       @default_handlers_setup = false |       @default_handlers_setup = false | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue