Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/thor/shell/basic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def merge(destination, content) #:nodoc:
Tempfile.open([File.basename(destination), File.extname(destination)], File.dirname(destination)) do |temp|
temp.write content
temp.rewind
system %(#{merge_tool} "#{temp.path}" "#{destination}")
system(merge_tool, temp.path, destination)
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/actions/create_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def silence!
create_file("doc/config.rb")
allow(@base.shell).to receive(:merge_tool).and_return("meld")
expect(Thor::LineEditor).to receive(:readline).and_return("m")
expect(@base.shell).to receive(:system).with(/meld/)
expect(@base.shell).to receive(:system).with("meld", /doc\/config\.rb/, /doc\/config\.rb/)
invoke!
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/shell/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,14 @@ def #456 Lanç...
it "invokes the merge tool" do
allow(shell).to receive(:merge_tool).and_return("meld")
expect(Thor::LineEditor).to receive(:readline).and_return("m")
expect(shell).to receive(:system).with(/meld/)
expect(shell).to receive(:system).with("meld", /foo/, "foo")
capture(:stdout) { shell.file_collision("foo") {} }
end

it "invokes the merge tool that specified at ENV['THOR_MERGE']" do
allow(ENV).to receive(:[]).with("THOR_MERGE").and_return("meld")
expect(Thor::LineEditor).to receive(:readline).and_return("m")
expect(shell).to receive(:system).with(/meld/)
expect(shell).to receive(:system).with("meld", /foo/, "foo")
capture(:stdout) { shell.file_collision("foo") {} }
end

Expand Down