File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ def merge(destination, content) #:nodoc:
372372 Tempfile . open ( [ File . basename ( destination ) , File . extname ( destination ) ] , File . dirname ( destination ) ) do |temp |
373373 temp . write content
374374 temp . rewind
375- system %( #{ merge_tool } " #{ temp . path } " " #{ destination } " )
375+ system ( merge_tool , temp . path , destination )
376376 end
377377 end
378378
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ def silence!
142142 create_file ( "doc/config.rb" )
143143 allow ( @base . shell ) . to receive ( :merge_tool ) . and_return ( "meld" )
144144 expect ( Thor ::LineEditor ) . to receive ( :readline ) . and_return ( "m" )
145- expect ( @base . shell ) . to receive ( :system ) . with ( / meld/)
145+ expect ( @base . shell ) . to receive ( :system ) . with ( " meld" , /doc \/ config \. rb/ , /doc \/ config \. rb /)
146146 invoke!
147147 end
148148 end
Original file line number Diff line number Diff line change @@ -553,14 +553,14 @@ def #456 Lanç...
553553 it "invokes the merge tool" do
554554 allow ( shell ) . to receive ( :merge_tool ) . and_return ( "meld" )
555555 expect ( Thor ::LineEditor ) . to receive ( :readline ) . and_return ( "m" )
556- expect ( shell ) . to receive ( :system ) . with ( / meld/ )
556+ expect ( shell ) . to receive ( :system ) . with ( " meld" , /foo/ , "foo" )
557557 capture ( :stdout ) { shell . file_collision ( "foo" ) { } }
558558 end
559559
560560 it "invokes the merge tool that specified at ENV['THOR_MERGE']" do
561561 allow ( ENV ) . to receive ( :[] ) . with ( "THOR_MERGE" ) . and_return ( "meld" )
562562 expect ( Thor ::LineEditor ) . to receive ( :readline ) . and_return ( "m" )
563- expect ( shell ) . to receive ( :system ) . with ( / meld/ )
563+ expect ( shell ) . to receive ( :system ) . with ( " meld" , /foo/ , "foo" )
564564 capture ( :stdout ) { shell . file_collision ( "foo" ) { } }
565565 end
566566
You can’t perform that action at this time.
0 commit comments