Skip to content

Commit 52614e1

Browse files
committed
Update the tests.
1 parent 8adce97 commit 52614e1

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

ObjectiveGitTests/GTBranchSpec.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174

175175
it(@"should return itself for a remote branch", ^{
176176
NSError *error = nil;
177-
GTReference *remoteRef = [GTReference referenceByLookingUpReferencedNamed:@"refs/remotes/origin/master" inRepository:repository error:&error];
177+
GTReference *remoteRef = [repository lookUpReferenceWithName:@"refs/remotes/origin/master" error:&error];
178178
expect(remoteRef).notTo(beNil());
179179
expect(error).to(beNil());
180180

ObjectiveGitTests/GTReferenceSpec.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
});
2323

2424
it(@"should compare equal to the same reference", ^{
25-
expect([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL]).to(equal([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL]));
25+
expect([repository lookUpReferenceWithName:@"refs/heads/master" error:NULL]).to(equal([repository lookUpReferenceWithName:@"refs/heads/master" error:NULL]));
2626
});
2727

2828
it(@"should compare unequal to a different reference", ^{
29-
expect([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL]).notTo(equal([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/remotes/origin/master" inRepository:repository error:NULL]));
29+
expect([repository lookUpReferenceWithName:@"refs/heads/master" error:NULL]).notTo(equal([repository lookUpReferenceWithName:@"refs/remotes/origin/master" error:NULL]));
3030
});
3131

3232
describe(@"remote property", ^{
3333
it(@"should be YES for a remote-tracking branch", ^{
3434
NSError *error = nil;
35-
GTReference *ref = [[GTReference alloc] initByLookingUpReferenceNamed:@"refs/remotes/origin/master" inRepository:repository error:&error];
35+
GTReference *ref = [repository lookUpReferenceWithName:@"refs/remotes/origin/master" error:&error];
3636
expect(ref).notTo(beNil());
3737
expect(error).to(beNil());
3838

@@ -42,7 +42,7 @@
4242

4343
it(@"should be NO for a local branch", ^{
4444
NSError *error = nil;
45-
GTReference *ref = [[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:&error];
45+
GTReference *ref = [repository lookUpReferenceWithName:@"refs/heads/master" error:&error];
4646
expect(ref).notTo(beNil());
4747
expect(error).to(beNil());
4848

@@ -131,7 +131,7 @@
131131
describe(@"+referenceByLookingUpReferenceNamed:inRepository:error:", ^{
132132
it(@"should return a valid reference to a branch", ^{
133133
NSError *error = nil;
134-
GTReference *ref = [GTReference referenceByLookingUpReferencedNamed:@"refs/heads/master" inRepository:bareRepository error:&error];
134+
GTReference *ref = [bareRepository lookUpReferenceWithName:@"refs/heads/master" error:&error];
135135
expect(ref).notTo(beNil());
136136
expect(error).to(beNil());
137137

@@ -140,7 +140,7 @@
140140

141141
it(@"should return a valid reference to a tag", ^{
142142
NSError *error = nil;
143-
GTReference *ref = [GTReference referenceByLookingUpReferencedNamed:@"refs/tags/v0.9" inRepository:bareRepository error:&error];
143+
GTReference *ref = [bareRepository lookUpReferenceWithName:@"refs/tags/v0.9" error:&error];
144144
expect(ref).notTo(beNil());
145145
expect(error).to(beNil());
146146

@@ -150,7 +150,7 @@
150150

151151
describe(@"creating", ^{
152152
it(@"can create a reference from a symbolic reference", ^{
153-
GTReference *target = [[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:bareRepository error:NULL];
153+
GTReference *target = [bareRepository lookUpReferenceWithName:@"refs/heads/master" error:NULL];
154154
expect(target).notTo(beNil());
155155

156156
NSError *error = nil;

ObjectiveGitTests/GTRepositorySpec.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@
357357
describe(@"-checkout:strategy:error:progressBlock:", ^{
358358
it(@"should allow references", ^{
359359
NSError *error = nil;
360-
GTReference *ref = [GTReference referenceByLookingUpReferencedNamed:@"refs/heads/other-branch" inRepository:repository error:&error];
360+
GTReference *ref = [repository lookUpReferenceWithName:@"refs/heads/other-branch" error:&error];
361361
expect(ref).notTo(beNil());
362362
expect(error.localizedDescription).to(beNil());
363363
BOOL result = [repository checkoutReference:ref strategy:GTCheckoutStrategyAllowConflicts error:&error progressBlock:nil];

0 commit comments

Comments
 (0)