Skip to content

Commit

Permalink
[Core] Use canonical path in tests (#2253)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepio authored Mar 4, 2021
1 parent fabe829 commit dde1d4c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void creates_parent_directories() {
}

@Test
void cant_create_plugin_when_parent_directory_is_a_file() {
void cant_create_plugin_when_parent_directory_is_a_file() throws IOException {
Path htmlReport = tmp.resolve("target/cucumber/reports");
PluginOption htmlOption = parse("html:" + htmlReport);
plugin = fc.create(htmlOption);
Expand All @@ -101,8 +101,8 @@ void cant_create_plugin_when_parent_directory_is_a_file() {

IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> fc.create(jsonOption));
assertThat(exception.getMessage(), is(equalTo(
"Couldn't create parent directories of '" + jsonReport + "'.\n" +
"Make sure the the parent directory '" + jsonReport.getParent() + "' isn't a file.\n" +
"Couldn't create parent directories of '" + jsonReport.toFile().getCanonicalPath() + "'.\n" +
"Make sure the the parent directory '" + jsonReport.getParent().toFile().getCanonicalPath() + "' isn't a file.\n" +
"\n" +
"Note: This usually happens when plugins write to colliding paths.\n" +
"For example: 'html:target/cucumber, json:target/cucumber/report.json'\n" +
Expand Down

0 comments on commit dde1d4c

Please sign in to comment.