This repository was archived by the owner on Jul 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ def initialize(hash)
1010 end
1111
1212 def debug?
13- config . fetch ( "config" , { } ) . fetch ( "debug" , false )
13+ config . fetch ( "config" , { } ) . fetch ( "debug" , " false" ) . to_s . casecmp ( "true" ) . zero?
1414 end
1515
1616 def include_paths
Original file line number Diff line number Diff line change 170170 expect ( engine_config . concurrency ) . to eq ( 45 )
171171 end
172172 end
173+
174+ describe "debug" do
175+ it "passes through booleans" do
176+ engine_config = CC ::Engine ::Analyzers ::EngineConfig . new ( {
177+ "config" => {
178+ "debug" => true ,
179+ } ,
180+ } )
181+
182+ expect ( engine_config . debug? ) . to eq ( true )
183+ end
184+
185+ it "coerces 'true' to true" do
186+ engine_config = CC ::Engine ::Analyzers ::EngineConfig . new ( {
187+ "config" => {
188+ "debug" => "true" ,
189+ } ,
190+ } )
191+
192+ expect ( engine_config . debug? ) . to eq ( true )
193+ end
194+
195+ it "coerces 'false' to false" do
196+ engine_config = CC ::Engine ::Analyzers ::EngineConfig . new ( {
197+ "config" => {
198+ "debug" => "false" ,
199+ } ,
200+ } )
201+
202+ expect ( engine_config . debug? ) . to eq ( false )
203+ end
204+ end
173205end
You can’t perform that action at this time.
0 commit comments