Skip to content

Commit c0cbc91

Browse files
committed
Improvement: Use package directory structure to find snapshot path
1 parent 40d70f4 commit c0cbc91

File tree

4 files changed

+1
-1
lines changed

4 files changed

+1
-1
lines changed

snapshot-matcher/src/main/java/com/zenika/snapshotmatcher/SnapshotMatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void describeTo(Description description) {
126126
private Path getPath() {
127127
StackTraceElement caller = getCaller();
128128

129-
String callerClassName = caller.getClassName();
129+
String callerClassName = caller.getClassName().replace('.', '/');
130130
String callerMethodName = caller.getMethodName();
131131

132132
return Paths.get(String.format("src/test/resources/snapshots/%s/%s.json", callerClassName, callerMethodName));

0 commit comments

Comments
 (0)