Skip to content

Commit

Permalink
Update the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed Jun 4, 2015
1 parent 8adce97 commit 52614e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ObjectiveGitTests/GTBranchSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@

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

Expand Down
14 changes: 7 additions & 7 deletions ObjectiveGitTests/GTReferenceSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
});

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

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

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

Expand All @@ -42,7 +42,7 @@

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

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

Expand All @@ -140,7 +140,7 @@

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

Expand All @@ -150,7 +150,7 @@

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

NSError *error = nil;
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGitTests/GTRepositorySpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
describe(@"-checkout:strategy:error:progressBlock:", ^{
it(@"should allow references", ^{
NSError *error = nil;
GTReference *ref = [GTReference referenceByLookingUpReferencedNamed:@"refs/heads/other-branch" inRepository:repository error:&error];
GTReference *ref = [repository lookUpReferenceWithName:@"refs/heads/other-branch" error:&error];
expect(ref).notTo(beNil());
expect(error.localizedDescription).to(beNil());
BOOL result = [repository checkoutReference:ref strategy:GTCheckoutStrategyAllowConflicts error:&error progressBlock:nil];
Expand Down

0 comments on commit 52614e1

Please sign in to comment.