From c50464e366e26d00204a3b84f86ce9ba02589aeb Mon Sep 17 00:00:00 2001 From: Joshua Nichols Date: Thu, 1 Apr 2010 20:16:21 -0400 Subject: [PATCH] Added more clone specs. --- spec/homesick_spec.rb | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/spec/homesick_spec.rb b/spec/homesick_spec.rb index 28a50a4..9cdba4d 100644 --- a/spec/homesick_spec.rb +++ b/spec/homesick_spec.rb @@ -5,15 +5,29 @@ describe Homesick do @homesick = Homesick.new end - it "should clone any git repo" do - @homesick.should_receive(:git_clone).with('git://github.com/technicalpickles/pickled-vim.git') + 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.clone "git://github.com/technicalpickles/pickled-vim.git" - end + @homesick.clone "git://github.com/technicalpickles/pickled-vim.git" + end - it "should clone a github repo" do - @homesick.should_receive(:git_clone).with('git://github.com/wfarr/dotfiles.git', :destination => 'wfarr_dotfiles') + 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 "wfarr/dotfiles" + @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 + @homesick.should_receive(:git_clone).with('git://github.com/wfarr/dotfiles.git', :destination => 'wfarr_dotfiles') + + @homesick.clone "wfarr/dotfiles" + end end end