     }
     
     func testIsDirectory_brokenSymlink() {
-        let symbolicLink = NSURL(string: "symlink", relativeToURL: self.tempRepo)
-        try! fileManager.createSymbolicLinkAtURL(symbolicLink!, withDestinationURL: NSURL(string: "/blahonga", relativeToURL: self.tempRepo)!)
-        XCTAssertFalse(self.repo.urlIsDirectory(symbolicLink))
+        XCTAssertFalse(self.repo.urlIsDirectory(self.setUpSymlink(false).symbolicLink))
     }
     
     func testIsDirectory_symlink() {
-        let destination = NSURL(string: "sample_file", relativeToURL: self.tempRepo)
-        let symbolicLink = NSURL(string: "symlink", relativeToURL: self.tempRepo)
-        try! fileManager.createSymbolicLinkAtURL(symbolicLink!, withDestinationURL: destination!)
-        XCTAssertFalse(self.repo.urlIsDirectory(symbolicLink))
+        XCTAssertFalse(self.repo.urlIsDirectory(self.setUpSymlink(true).symbolicLink))
     }
     
     func testIsSymlink_isFile() {

        try! fileManager.removeItemAtURL(tempRepo!)
    }

    func testRepoRoot() {
        guard let repoPath = self.repo.repoRoot.path else {
            XCTFail("repoRoot is nil")

    }
    
    func testIsSymlink_brokenSymlink() {
        XCTAssertTrue(self.repo.urlIsSymlink(self.setUpSymlink(false).symbolicLink))
    }
    
    func testIsSymlink_symlink() {
        XCTAssertTrue(self.repo.urlIsSymlink(self.setUpSymlink(true).symbolicLink))
    }
    
    func testIsSymlink_doesNotExist() {
