Skip to content

Commit

Permalink
Allow redefinition of git repos, just use the previous one
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Delcambre & Larry Diehl committed Aug 31, 2010
1 parent 50e8e5d commit e371a77
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion spec/support/git_repo.rb
Expand Up @@ -19,6 +19,5 @@ def use_git_repo(repo_name)
FakeFS.without { Dir.chdir(@_original_wd.pop) }
end
end

end
end
3 changes: 1 addition & 2 deletions spec/support/helpers.rb
Expand Up @@ -142,7 +142,7 @@ def fake_awsm

def define_git_repo(name, &setup)
@git_repo_setup ||= {}
raise "Attempted to redefine git repo #{name}; don't do that!" if @git_repo_setup.has_key?(name)
return if @git_repo_setup.key?(name)
@git_repo_setup[name] = setup
end

Expand All @@ -162,6 +162,5 @@ def git_repo_dir(name)
end
@git_repo_dir_cache[name] = git_dir
end

end
end

0 comments on commit e371a77

Please sign in to comment.