|
22 | 22 | }); |
23 | 23 |
|
24 | 24 | 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])); |
26 | 26 | }); |
27 | 27 |
|
28 | 28 | 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])); |
30 | 30 | }); |
31 | 31 |
|
32 | 32 | describe(@"remote property", ^{ |
33 | 33 | it(@"should be YES for a remote-tracking branch", ^{ |
34 | 34 | 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]; |
36 | 36 | expect(ref).notTo(beNil()); |
37 | 37 | expect(error).to(beNil()); |
38 | 38 |
|
|
42 | 42 |
|
43 | 43 | it(@"should be NO for a local branch", ^{ |
44 | 44 | 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]; |
46 | 46 | expect(ref).notTo(beNil()); |
47 | 47 | expect(error).to(beNil()); |
48 | 48 |
|
|
131 | 131 | describe(@"+referenceByLookingUpReferenceNamed:inRepository:error:", ^{ |
132 | 132 | it(@"should return a valid reference to a branch", ^{ |
133 | 133 | 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]; |
135 | 135 | expect(ref).notTo(beNil()); |
136 | 136 | expect(error).to(beNil()); |
137 | 137 |
|
|
140 | 140 |
|
141 | 141 | it(@"should return a valid reference to a tag", ^{ |
142 | 142 | 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]; |
144 | 144 | expect(ref).notTo(beNil()); |
145 | 145 | expect(error).to(beNil()); |
146 | 146 |
|
|
150 | 150 |
|
151 | 151 | describe(@"creating", ^{ |
152 | 152 | 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]; |
154 | 154 | expect(target).notTo(beNil()); |
155 | 155 |
|
156 | 156 | NSError *error = nil; |
|
0 commit comments