Added more clone specs.

This commit is contained in:
Joshua Nichols
2010-04-01 20:16:21 -04:00
parent c5f8563f71
commit c50464e366

View File

@@ -5,15 +5,29 @@ describe Homesick do
@homesick = Homesick.new @homesick = Homesick.new
end end
it "should clone any git repo" do describe "clone" do
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') @homesick.should_receive(:git_clone).with('git://github.com/technicalpickles/pickled-vim.git')
@homesick.clone "git://github.com/technicalpickles/pickled-vim.git" @homesick.clone "git://github.com/technicalpickles/pickled-vim.git"
end 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')
@homesick.clone 'git@github.com:technicalpickles/pickled-vim.git'
end
it "should clone git repo like http://host/path/to.git" do
@homesick.should_receive(:git_clone).with('http://github.com/technicalpickles/pickled-vim.git')
@homesick.clone 'http://github.com/technicalpickles/pickled-vim.git'
end
it "should clone a github repo" do it "should clone a github repo" do
@homesick.should_receive(:git_clone).with('git://github.com/wfarr/dotfiles.git', :destination => 'wfarr_dotfiles') @homesick.should_receive(:git_clone).with('git://github.com/wfarr/dotfiles.git', :destination => 'wfarr_dotfiles')
@homesick.clone "wfarr/dotfiles" @homesick.clone "wfarr/dotfiles"
end end
end
end end