Skip to content

Commit

Permalink
test again
Browse files Browse the repository at this point in the history
  • Loading branch information
dfa1 committed Dec 21, 2023
1 parent f4e62b6 commit 261a239
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.UncheckedIOException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -66,8 +67,7 @@ private static String getCurrentBranch(State state) {
return bufferedReader.readLine();
}
} catch (IOException e) {
LOGGER.log(Level.FINE, "cannot start git, ignoring", e);
return null;
throw new UncheckedIOException(e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
package hosh.runtime;

import hosh.spi.State;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

Expand Down Expand Up @@ -60,17 +58,14 @@ void outsideGit() {
void insideGit() {
// Given
Path path = Paths.get(".").toAbsolutePath();
throw new IllegalArgumentException("path " + path.toString());
/*
given(state.getCwd()).willReturn(path);
GitCurrentBranchPromptProvider sut = new GitCurrentBranchPromptProvider();

// When
Assumptions.assumeTrue(Files.isDirectory(path.resolve(".git")));
String result = sut.provide(state);

// Then
assertThat(result).isNotNull();*/
assertThat(result).isNotNull();
}

}

0 comments on commit 261a239

Please sign in to comment.