Remove .git suffix on destination directory if URL ends with it.
For example, the following:
homesick clone git://github.com/technicalpickles/pickled-vim.git
should produce a castle directory of:
$HOME/.homesick/repos/pickled-vim
This commit is contained in:
@@ -39,6 +39,14 @@ describe "homesick" do
|
||||
end
|
||||
end
|
||||
|
||||
it "should clone git repo like file:///path/to.git" do
|
||||
bare_repo = File.join(create_construct.to_s, "dotfiles.git")
|
||||
system "git init --bare #{bare_repo} >/dev/null 2>&1"
|
||||
|
||||
homesick.clone "file://#{bare_repo}"
|
||||
File.directory?(File.join(home.to_s, '.homesick/repos/dotfiles')).should be_true
|
||||
end
|
||||
|
||||
it "should clone git repo like git://host/path/to.git" do
|
||||
homesick.should_receive(:git_clone).with('git://github.com/technicalpickles/pickled-vim.git')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user