diff --git a/tests/StarterKits/ExportTest.php b/tests/StarterKits/ExportTest.php index 7a536a84ee..6f51a373fa 100644 --- a/tests/StarterKits/ExportTest.php +++ b/tests/StarterKits/ExportTest.php @@ -173,7 +173,11 @@ public function it_can_clear_target_export_path_with_clear_option() base_path('two'), ]); - // Imagine this exists from previous export + // Imagine we already have a target a git repo + $this->files->makeDirectory($this->targetPath('.git'), 0777, true, true); + $this->files->put($this->targetPath('.git/config'), 'Config.'); + + // And imagine this exists from previous export $this->files->makeDirectory($this->exportPath('one'), 0777, true, true); $this->files->put($this->exportPath('one/file.md'), 'One.'); @@ -195,10 +199,13 @@ public function it_can_clear_target_export_path_with_clear_option() $this->exportCoolRunnings(['--clear' => true]); - // But 'one' folder should exist after exporting with `--clear` option + // Our 'one' folder shouldn't exist after exporting with `--clear` option $this->assertFileDoesNotExist($this->exportPath('one')); $this->assertFileExists($this->exportPath('two')); + // But it should not clear `.git` directory + $this->assertFileExists($this->targetPath('.git/config')); + $this->exportCoolRunnings(); $this->cleanPaths($paths);