From 35fe4a139dde1619a8a3f2041c6d04a22b23de59 Mon Sep 17 00:00:00 2001 From: github actions Date: Mon, 3 Feb 2025 18:29:16 +0000 Subject: [PATCH] . d updated markdown snippets --- approvaltests/docs/Configuration.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/approvaltests/docs/Configuration.md b/approvaltests/docs/Configuration.md index 189d014ee..19e1bbf4b 100644 --- a/approvaltests/docs/Configuration.md +++ b/approvaltests/docs/Configuration.md @@ -152,11 +152,12 @@ Function2 myFinder = new Function2() @Override public File call(Class clazz, String fileName) { - return new File("src/test/java/" + clazz.getPackage().getName().replaceAll("\\.", "/")); + return new File(ClassUtils.getProjectRootPath() + "/src/test/java/" + + clazz.getPackage().getName().replaceAll("\\.", "/")); } }; ``` -snippet source | anchor +snippet source | anchor ### Using alternatives Thanks to the try block, the default is restored afterwards allowing tests to be independent. @@ -169,7 +170,7 @@ try (SourceDirectoryRestorer sdr = TestUtils.registerSourceDirectoryFinder(myFin Approvals.verify("Ragunath"); } ``` -snippet source | anchor +snippet source | anchor ---