src/test/java/com/greghaskins/spectrum/SpectrumHelper.java
/**
   * Allows a listener to listen to a run.
   * @param specClass the class to execute via Spectrum
   * @param listener the listener to use
   * @param <T> type of listener
   * @return the listener for fluent usage
   * @throws Exception on error
   */
Allows a listener to listen to a run.
Allows a listener to listen to a run .
public static <T extends RunListener> T runWithListener(final Class<?> specClass,
      final T listener) throws Exception {
    RunNotifier notifier = new RunNotifier();
    notifier.addListener(listener);
    new Spectrum(specClass).run(notifier);
    return listener;
  }
public static < T extends RunListener > T runWithListener ( final Class < ? > specClass , final T listener ) throws Exception { RunNotifier notifier = new RunNotifier ( ) ; notifier . addListener ( listener ) ; new Spectrum ( specClass ) . run ( notifier ) ; return listener ; }
Allows a listener to listen to a run.
Allows a listener to listen to a run .