title: Swift - Get NSBundle for test target?
body: <p>In Objective C whenever I had to access the test bundle I would call</p>
  
  <pre><code>[NSBundle bundleForClass:[ClassInTestTarget class]];
  </code></pre>
  
  <p><code>bundleForClass</code> is not available in Swift, so how do I access the test bundle?</p>
  
  <p>The reason I need this is that in order to write tests for a framework I'm working on I have to use an in memory core data stack. Initially all resources were included in both main target and test target, but then I moved all these test helpers to test target only, and now the code below is returning nil which fails all my tests</p>
  
  <pre><code>let modelURL = NSBundle.mainBundle().URLForResource("Model", withExtension: "momd")
  </code></pre>