title: NSURL to file path in test bundle with XCTest
body: <p>I am trying to write an iOS app using TDD and the new XCTest framework. One of my methods retrieves a file from the internet (given a NSURL object) and stores it in the user's documents. The signature of the method is similar to:</p>
  
  <pre><code>- (void) fetchAndStoreImage:(NSURL *)imageUrl
  </code></pre>
  
  <p>I'm trying to write the test for this method in a way that it doesn't fail if there is no connection to the internet. My approach (taken from a previous <a href="https://stackoverflow.com/questions/19261412/unit-test-method-with-nsdata-datawithcontentsofurl">question</a>) is to call the method using a NSURL to an image in the local file system.</p>
  
  <p>When a new project with unit tests enabled is created, the Tests directory has a subdirectory named 'Supporting Files'. I suppose that is where my test images should go. My question is how can I get a NSURL object that points to an image in this directory, as I wouldn't want test images to be bundled with the application. Any help is appreciated.</p>