diff --git a/core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java b/core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java index 72ce5aaa41..74674854a3 100644 --- a/core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java +++ b/core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java @@ -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); @@ -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" +