Skip to content

Commit 10be65b

Browse files
committed
Review Feedback Vol. 2
1 parent 7db7857 commit 10be65b

File tree

2 files changed

+62
-61
lines changed

2 files changed

+62
-61
lines changed

spock-core/src/main/java/org/spockframework/mock/EmptyOrDummyResponse.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ private Object createDummy(IMockInvocation invocation) {
161161
Class<?> type = invocation.getMethod().getReturnType();
162162
Type genericType = invocation.getMethod().getExactReturnType();
163163
Specification spec = invocation.getMockObject().getSpecification();
164-
return SpecInternals.createMock(spec, "dummy", genericType, MockNature.STUB, GroovyObject.class.isAssignableFrom(type) ?
165-
MockImplementation.GROOVY : MockImplementation.JAVA, emptyMap(), null);
164+
return GroovyObject.class.isAssignableFrom(type)
165+
? SpecInternals.GroovyStubImpl(spec, "dummy", genericType)
166+
: SpecInternals.StubImpl(spec, "dummy", genericType);
166167
}
167168
}

0 commit comments

Comments
 (0)