Commit 4e9284a0 authored by Marin Jankovski's avatar Marin Jankovski

Clear state in test satellite dir.

parent e16eb912
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment