From c913715ec9561d16a12b3bb1520f354a5121f735 Mon Sep 17 00:00:00 2001 From: ethicalhack3r Date: Sun, 13 Jan 2013 20:34:26 +0100 Subject: [PATCH] Spec for reset_head git updater. --- spec/lib/updater/git_updater_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/lib/updater/git_updater_spec.rb b/spec/lib/updater/git_updater_spec.rb index 0a326158..153cd0cc 100644 --- a/spec/lib/updater/git_updater_spec.rb +++ b/spec/lib/updater/git_updater_spec.rb @@ -62,4 +62,11 @@ describe GitUpdater do end end + describe "#reset_head" do + it "should reset the local repo" do + stub_system_command(@git_updater, /^git .* reset --hard HEAD/, "HEAD is now at") + @git_updater.reset_head.should match(/^HEAD is now at/) + end + end + end