diff options
author | Marin Jankovski <marin@gitlab.com> | 2013-11-12 18:11:46 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2013-11-12 18:11:46 +0400 |
commit | 4e9284a023f26e3dfd56a0130b8e2a38c884f0e6 (patch) | |
tree | 4fec442ed7a1ec887d79e32d73dacdf96b8d1980 /spec/support | |
parent | e16eb912990770c9e5bddece966d2988ed7fa575 (diff) |
Clear state in test satellite dir.
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/test_env.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index 5dbdffe4102..87dffe197d6 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -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 |