Skip to content

Instantly share code, notes, and snippets.

@szpak
Created January 25, 2012 22:57
Show Gist options
  • Save szpak/1679478 to your computer and use it in GitHub Desktop.
Save szpak/1679478 to your computer and use it in GitHub Desktop.
Not working with jbehave-maven-plugin SpringReportingAnnotatedEmbedderRunner
/**
* Copyright (c) 2012 Alexander Lehmann
*
* All rights reserved.
*
* More info: https://github.com/alexlehm/jbehave-junit-examples/
*/
package runner;
import org.jbehave.core.junit.spring.SpringAnnotatedEmbedderRunner;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.model.InitializationError;
public class SpringReportingAnnotatedEmbedderRunner extends SpringAnnotatedEmbedderRunner {
private Class<?> testClass;
public SpringReportingAnnotatedEmbedderRunner(Class<?> testClass) throws InitializationError {
super(testClass);
this.testClass = testClass;
}
@Override
public void run(RunNotifier notifier) {
JUnitTestPerExampleStoryReporter.registerRunNotifier(notifier);
JUnitTestPerExampleStoryReporter.registerTestClass(testClass);
super.run(notifier);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment