Commit 4e9284a023f26e3dfd56a0130b8e2a38c884f0e6
1 parent
e16eb912
Exists in
master
and in
4 other branches
Clear state in test satellite dir.
Showing
2 changed files
with
10 additions
and
0 deletions
Show diff stats
spec/factories.rb
spec/support/test_env.rb
| ... | ... | @@ -97,6 +97,15 @@ module TestEnv |
| 97 | 97 | FileUtils.rm_rf File.join(testing_path(), "#{name}.wiki.git") |
| 98 | 98 | end |
| 99 | 99 | |
| 100 | + def reset_satellite_dir | |
| 101 | + setup_stubs | |
| 102 | + FileUtils.cd(seed_satellite_path) do | |
| 103 | + `git reset --hard --quiet` | |
| 104 | + `git clean -fx` | |
| 105 | + `git checkout --quiet origin/master` | |
| 106 | + end | |
| 107 | + end | |
| 108 | + | |
| 100 | 109 | # Create a repo and it's satellite |
| 101 | 110 | def create_repo(namespace, name) |
| 102 | 111 | setup_stubs | ... | ... |