Clear state in test satellite dir.
This commit is contained in:
parent
e16eb91299
commit
4e9284a023
2 changed files with 10 additions and 0 deletions
|
@ -66,6 +66,7 @@ FactoryGirl.define do
|
|||
|
||||
after :create do |project|
|
||||
TestEnv.clear_repo_dir(project.namespace, project.path)
|
||||
TestEnv.reset_satellite_dir
|
||||
TestEnv.create_repo(project.namespace, project.path)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -97,6 +97,15 @@ module TestEnv
|
|||
FileUtils.rm_rf File.join(testing_path(), "#{name}.wiki.git")
|
||||
end
|
||||
|
||||
def reset_satellite_dir
|
||||
setup_stubs
|
||||
FileUtils.cd(seed_satellite_path) do
|
||||
`git reset --hard --quiet`
|
||||
`git clean -fx`
|
||||
`git checkout --quiet origin/master`
|
||||
end
|
||||
end
|
||||
|
||||
# Create a repo and it's satellite
|
||||
def create_repo(namespace, name)
|
||||
setup_stubs
|
||||
|
|
Loading…
Reference in a new issue