Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)

This commit is contained in:
spf13 2015-05-20 02:21:21 -04:00
parent 599d1b9786
commit a584ff207b
15 changed files with 223 additions and 101 deletions

View file

@ -431,6 +431,8 @@ func TestExists(t *testing.T) {
}
func TestAbsPathify(t *testing.T) {
defer viper.Reset()
type test struct {
inPath, workingDir, expected string
}
@ -450,6 +452,7 @@ func TestAbsPathify(t *testing.T) {
}
for i, d := range data {
viper.Reset()
// todo see comment in AbsPathify
viper.Set("WorkingDir", d.workingDir)