diff --git a/test/link_test.go b/test/link_test.go index 337e8a2..657a83f 100644 --- a/test/link_test.go +++ b/test/link_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/Marcusk19/dotctl/cmd" + "github.com/spf13/afero" "github.com/spf13/viper" "github.com/stretchr/testify/assert" ) @@ -15,6 +16,7 @@ import ( func TestLinkCommand(t *testing.T) { viper.Set("testing", true) + cmd.FileSystem = afero.NewMemMapFs() fs := cmd.FileSystem homedir := os.Getenv("HOME") diff --git a/test/status_test.go b/test/status_test.go index e004769..1eacf07 100644 --- a/test/status_test.go +++ b/test/status_test.go @@ -7,11 +7,13 @@ import ( "testing" "github.com/Marcusk19/dotctl/cmd" + "github.com/spf13/afero" "github.com/spf13/viper" "github.com/stretchr/testify/assert" ) func TestStatusCommand(t *testing.T) { + cmd.FileSystem = afero.NewMemMapFs() viper.Set("testing", true) fs := cmd.FileSystem