title: CLLocationManager and unit testing
body: <p>I have been trying to add some (logic) unit tests to my code recently. I've set up the tests with <a href="https://github.com/allending/Kiwi" rel="nofollow">Kiwi</a>, I like the BDD style and the syntax.</p>
  
  <p>My problem now is that I'm trying to test some code that relies on <code>CLLocationManager</code> sending a correct <code>locationManager:didUpdateToLocation:fromLocation:</code>. However, this never happens when I run the test, presumably because <code>CLLocationManager</code> thinks it's not authorised. For the record, I have added a <em>.gpx</em> file to the test target and edited the scheme to use that file as the location (under <strong>Edit Scheme...</strong> -> <strong>Test</strong> -> <strong>Info</strong>). The same code works fine when I run the full app in the simulator. Any idea how I can get (simulated) location updates to be sent in a test case?</p>