File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,9 @@ def file_collision(destination)
252
252
)
253
253
254
254
case answer
255
+ when nil
256
+ say ""
257
+ return true
255
258
when is? ( :yes ) , is? ( :force ) , ""
256
259
return true
257
260
when is? ( :no ) , is? ( :skip )
Original file line number Diff line number Diff line change @@ -310,6 +310,12 @@ def #456 Lanç...
310
310
shell . file_collision ( "foo" )
311
311
end
312
312
313
+ it "outputs a new line and returns true if stdin is closed" do
314
+ expect ( $stdout) . to receive ( :print ) . with ( "\n " )
315
+ expect ( Thor ::LineEditor ) . to receive ( :readline ) . and_return ( nil )
316
+ expect ( shell . file_collision ( "foo" ) ) . to be true
317
+ end
318
+
313
319
it "returns true if the user chooses default option" do
314
320
expect ( Thor ::LineEditor ) . to receive ( :readline ) . and_return ( "" )
315
321
expect ( shell . file_collision ( "foo" ) ) . to be true
You can’t perform that action at this time.
0 commit comments