private boolean scanScopedBean(ScanScopedBeans scanScopedBeans, Set<String> scopes, BeanDefinition beanDefinition) {
    return scanScopedBeans != null && (scopes.size() == 0 || scopes.contains(beanDefinition.getScope()));
  }
This {@link TestExecutionListener} takes care of attaching and detaching the
mocks to the current {@link Specification}.

@author Leonard Bruenings
spock-spring/src/main/java/org/spockframework/spring/SpringMockTestExecutionListener.java