package com.dhemery.runtimesuite.internal;

import java.util.List;

import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.InitializationError;


public class RunnableClassRunner extends BlockJUnit4ClassRunner {
	private static List<FrameworkMethod> runnableMethods;

	public RunnableClassRunner(RunnableClass runnable) throws InitializationError {
		super(testClass(runnable));
	}

	private static Class<?> testClass(RunnableClass runnable) {
		runnableMethods = runnable.runnableMethods();
		return runnable.testClass();
	}

	@Override
	public List<FrameworkMethod> computeTestMethods() {
		return runnableMethods;	
	}
}

@@ -415,16 +415,314 @@
 Error %7B%0A
+%09%09// This calls the static method testClass() to initialize runnableMethods.%0A%09%09// This is a horrible idea. But computeTestMethods() is called during%0A%09%09// super(), and it needs runnableMethods. So I have to initialize%0A%09%09// runnableMethods before calling super(). Gack.%0A%09%09// TODO: Find a better way.%0A
 %09%09super(

Add a note about the horribly cheesy workaround in RunnableClassRunner