// MockEvalSymlinks replaces the path/filepath.EvalSymlinks function used inside the caps package. func MockEvalSymlinks(test *testutil.BaseTest, fn func(string) (string, error)) { orig := evalSymlinks evalSymlinks = fn test.AddCleanup(func() { evalSymlinks = orig }) }
// MockProfilesPath mocks the file read by LoadedProfiles() func MockProfilesPath(t *testutil.BaseTest, profiles string) { profilesPath = profiles t.AddCleanup(func() { profilesPath = realProfilesPath }) }