From 7ac9f79439ccf1da22c93dd4a125812ec101dbb3 Mon Sep 17 00:00:00 2001 From: ethicalhack3r Date: Sun, 13 Jan 2013 20:17:14 +0100 Subject: [PATCH] Added '{repo_directory_arguments()}' to has_local_changes? --- lib/updater/git_updater.rb | 2 +- spec/lib/updater/git_updater_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/updater/git_updater.rb b/lib/updater/git_updater.rb index 5e591090..0afb4336 100644 --- a/lib/updater/git_updater.rb +++ b/lib/updater/git_updater.rb @@ -35,7 +35,7 @@ class GitUpdater < Updater end def has_local_changes? - %x[git diff --exit-code 2>&1] =~ /diff/ ? true : false + %x[git #{repo_directory_arguments()} diff --exit-code 2>&1] =~ /diff/ ? true : false end def reset_head diff --git a/spec/lib/updater/git_updater_spec.rb b/spec/lib/updater/git_updater_spec.rb index c1fc9ae5..0a326158 100644 --- a/spec/lib/updater/git_updater_spec.rb +++ b/spec/lib/updater/git_updater_spec.rb @@ -47,7 +47,7 @@ describe GitUpdater do describe "#has_local_changes?" do after :each do - stub_system_command(@git_updater, /^git diff --exit-code 2>&1/, @stub_value) + stub_system_command(@git_updater, /^git .* diff --exit-code 2>&1/, @stub_value) @git_updater.has_local_changes?.should === @expected end