public void visitSpec(SpecInfo spec)
{
ArquillianInterceptor interceptor = new ArquillianInterceptor(deployableTest);
final SpecInfo topSpec = spec.getTopSpec();
topSpec.getSetupSpecMethod().addInterceptor(interceptor);
topSpec.getSetupMethod().addInterceptor(interceptor);
// add Interceptors to all feature methods
for(FeatureInfo feature : topSpec.getAllFeatures())
{
feature.getFeatureMethod().addInterceptor(interceptor);
}
topSpec.getCleanupMethod().addInterceptor(interceptor);
topSpec.getCleanupSpecMethod().addInterceptor(interceptor);
// set the last created Spec, so we can call AfterSuite only when this is done.
lastCreatedSpec = topSpec;
topSpec.addListener(new AbstractRunListener()
{
@Override
public void afterSpec(SpecInfo spec)
{
if(spec == lastCreatedSpec)