Test class dependency

Bit of a basic question, but what’s the recommended way to specify that a module’s test classes depend on another module’s test classes?

Some equivalent of ‘compile project(’:foo’)’ that lets me depend on foo’s test classes.

Just saw this which sort of answers the question: http://forums.gradle.org/gradle/topics/how_do_i_declare_a_dependency_on_a_modules_test_code

Not particularly pleasant, but works I spose.