I have done this by using OCMockito with XCTest.
CLBeacon *mockBeacon = mock([CLBeacon class]);
Then I can use this to call the delegate methods on the class that is the CoreLocation delegate. The test might look like this:
- (void)testDidRangeOnABeacon
{
MyLocationDelegate *myDelegate = [[MyLocationDelegate alloc] init];
CLLocationManager *mockManager = mock([CLLocationManager class]);
CLBeacon *mockBeacon = mock([CLBeacon class]);
CLBeaconRegion *mockRegion = mock([CLBeaconRegion class]);
[myDelegate locationManager:mockManager
didRangeBeacons:@[mockBeacon]
inRegion:mockRegion];
// XCTAsserts...
XCTAssert([myDelegate.checkSomethingAboutRanging]);
}