Skip to content

Commit

Permalink
Switch helper to the true method
Browse files Browse the repository at this point in the history
  • Loading branch information
tiennou committed Jun 19, 2017
1 parent 558a039 commit 8c09e8b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ObjectiveGitTests/GTUtilityFunctions.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@
#pragma mark - Branch

BranchBlock localBranchWithName = ^ GTBranch * (NSString *branchName, GTRepository *repo) {
NSString *reference = [GTBranch.localNamePrefix stringByAppendingString:branchName];
NSArray *branches = [repo branchesWithPrefix:reference error:NULL];
expect(branches).notTo(beNil());
expect(@(branches.count)).to(equal(@1));
expect(((GTBranch *)branches[0]).shortName).to(equal(branchName));
BOOL success = NO;
GTBranch *branch = [repo lookUpBranchWithName:branchName type:GTBranchTypeLocal success:&success error:NULL];
expect(branch).notTo(beNil());
expect(branch.shortName).to(equal(branchName));

return branches[0];
return branch;
};

0 comments on commit 8c09e8b

Please sign in to comment.