Added '{repo_directory_arguments()}' to has_local_changes?

This commit is contained in:
ethicalhack3r
2013-01-13 20:17:14 +01:00
parent ecaf0894dd
commit 7ac9f79439
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,7 @@ class GitUpdater < Updater
end end
def has_local_changes? 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 end
def reset_head def reset_head

View File

@@ -47,7 +47,7 @@ describe GitUpdater do
describe "#has_local_changes?" do describe "#has_local_changes?" do
after :each 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 @git_updater.has_local_changes?.should === @expected
end end