Skip to content

Commit b5960d8

Browse files
committed
Remove GTRemoteSpec commit test helper
1 parent 817a886 commit b5960d8

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

ObjectiveGitTests/GTRemoteSpec.m

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -132,26 +132,6 @@
132132
expect(newRemote.URLString).to(equal(@"git://user@example.com/testrepo.git"));
133133
});
134134
});
135-
136-
// Helper to quickly create commits
137-
GTCommit *(^createCommitInRepository)(NSString *, NSData *, NSString *, GTRepository *) = ^(NSString *message, NSData *fileData, NSString *fileName, GTRepository *repo) {
138-
GTTreeBuilder *treeBuilder = [[GTTreeBuilder alloc] initWithTree:nil repository:repo error:nil];
139-
[treeBuilder addEntryWithData:fileData fileName:fileName fileMode:GTFileModeBlob error:nil];
140-
141-
GTTree *testTree = [treeBuilder writeTree:nil];
142-
143-
// We need the parent commit to make the new one
144-
GTReference *headReference = [repo headReferenceWithError:nil];
145-
146-
GTEnumerator *commitEnum = [[GTEnumerator alloc] initWithRepository:repo error:nil];
147-
[commitEnum pushSHA:[headReference targetSHA] error:nil];
148-
GTCommit *parent = [commitEnum nextObject];
149-
150-
GTCommit *testCommit = [repo createCommitWithTree:testTree message:message parents:@[parent] updatingReferenceNamed:headReference.name error:nil];
151-
expect(testCommit).notTo(beNil());
152-
153-
return testCommit;
154-
};
155135
});
156136

157137
QuickSpecEnd

0 commit comments

Comments
 (0)