Skip to content

Commit dde1d4c

Browse files
authored
[Core] Use canonical path in tests (#2253)
1 parent fabe829 commit dde1d4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void creates_parent_directories() {
9191
}
9292

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

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

0 commit comments

Comments
 (0)