Unfortunately, while in a unit test (or a logical test) - you are not really "in your application" (ie its sandbox). This is why things like NSDocumentDirectory or [NSBundle mainBundle] will not work.
If this works for you, Iβm just going to create the Documents folder in
/Users/hgpc/Library/Application Support/iPhone Simulator/5.0
You might want to do this in your test suite, so you can remove it in tearDown.
If this does not work because your tests depend on what is already in your NSDocumentDirectory application, you may need to think a little about your test, since they should all be autonomous (i.e. set all the resources from your package to setUp )
You can also use NSLibraryDirectory instead of NSDocumentDirectory, depending on what you want to check.
source share