@@ -283,11 +283,11 @@ module Homesick
|
|||||||
end
|
end
|
||||||
check_castle_existance castle, 'open'
|
check_castle_existance castle, 'open'
|
||||||
castle_dir = repos_dir.join(castle)
|
castle_dir = repos_dir.join(castle)
|
||||||
say_status "#{ENV['EDITOR']} #{castle_dir.realpath}",
|
say_status "#{castle_dir.realpath}: #{ENV['EDITOR']} .",
|
||||||
"Opening the root directory of castle '#{castle}' in editor '#{ENV['EDITOR']}'.",
|
"Opening the root directory of castle '#{castle}' in editor '#{ENV['EDITOR']}'.",
|
||||||
:green
|
:green
|
||||||
inside castle_dir do
|
inside castle_dir do
|
||||||
system(ENV['EDITOR'])
|
system("#{ENV['EDITOR']} .")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -712,7 +712,7 @@ describe Homesick::CLI do
|
|||||||
allow(ENV).to receive(:[]).with('EDITOR').and_return('vim')
|
allow(ENV).to receive(:[]).with('EDITOR').and_return('vim')
|
||||||
given_castle 'castle_repo'
|
given_castle 'castle_repo'
|
||||||
expect(homesick).to receive('inside').once.with(kind_of(Pathname)).and_yield
|
expect(homesick).to receive('inside').once.with(kind_of(Pathname)).and_yield
|
||||||
expect(homesick).to receive('system').once.with('vim')
|
expect(homesick).to receive('system').once.with('vim .')
|
||||||
Capture.stdout { homesick.open 'castle_repo' }
|
Capture.stdout { homesick.open 'castle_repo' }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user