@Test
public void createsCacheForAFile() {
final TestFile dir = tmpDir.createDir("otherDir");
context.checking(new Expectations() {{
one(cacheFactory).open(dir.file(".gradle", version, "a/b/c"), CacheUsage.ON, Collections.EMPTY_MAP);
will(returnValue(cache));
}});
assertThat(repository.cache("a/b/c").forObject(dir).open(), sameInstance(cache));
}