Skip to content

Update to v0.28-rc1 #685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "jspahrsummers/xcconfigs" "master"
github "Quick/Quick" ~> 1.2.0
github "Quick/Nimble" ~> 7.1.0
github "ZipArchive/ZipArchive" ~> 2.1.2
github "Quick/Quick" ~> 1.3.4
github "Quick/Nimble" ~> 7.3.3
github "ZipArchive/ZipArchive" ~> 2.1.4
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "Quick/Nimble" "v7.1.0"
github "Quick/Quick" "v1.2.0"
github "ZipArchive/ZipArchive" "v2.1.2"
github "Quick/Nimble" "v7.3.3"
github "Quick/Quick" "v1.3.4"
github "ZipArchive/ZipArchive" "v2.1.4"
github "jspahrsummers/xcconfigs" "bb795558a76e5daf3688500055bbcfe243bffa8d"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Nimble
Submodule Nimble updated 59 files
+43 −1 .travis.yml
+1 −1 Cartfile.private
+1 −1 Cartfile.resolved
+2 −0 Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h
+2 −0 Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Posix/CwlPreconditionTesting_POSIX.h
+1 −1 Gemfile
+39 −36 Gemfile.lock
+3 −4 Nimble.podspec
+47 −29 Nimble.xcodeproj/project.pbxproj
+2 −2 Sources/Nimble/Adapters/AssertionRecorder.swift
+3 −3 Sources/Nimble/Adapters/NMBExpectation.swift
+23 −13 Sources/Nimble/Adapters/NMBObjCMatcher.swift
+6 −3 Sources/Nimble/Adapters/NimbleEnvironment.swift
+12 −1 Sources/Nimble/Adapters/NimbleXCTestHandler.swift
+14 −21 Sources/Nimble/Expectation.swift
+3 −1 Sources/Nimble/ExpectationMessage.swift
+3 −3 Sources/Nimble/Matchers/AllPass.swift
+25 −82 Sources/Nimble/Matchers/Async.swift
+2 −2 Sources/Nimble/Matchers/BeAKindOf.swift
+2 −2 Sources/Nimble/Matchers/BeAnInstanceOf.swift
+16 −4 Sources/Nimble/Matchers/BeCloseTo.swift
+3 −3 Sources/Nimble/Matchers/BeEmpty.swift
+5 −5 Sources/Nimble/Matchers/BeGreaterThan.swift
+10 −10 Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift
+39 −8 Sources/Nimble/Matchers/BeIdenticalTo.swift
+10 −10 Sources/Nimble/Matchers/BeLessThan.swift
+9 −10 Sources/Nimble/Matchers/BeLessThanOrEqual.swift
+4 −4 Sources/Nimble/Matchers/BeLogical.swift
+1 −1 Sources/Nimble/Matchers/BeNil.swift
+2 −3 Sources/Nimble/Matchers/BeVoid.swift
+3 −3 Sources/Nimble/Matchers/BeginWith.swift
+24 −24 Sources/Nimble/Matchers/Contain.swift
+10 −12 Sources/Nimble/Matchers/ContainElementSatisfying.swift
+17 −21 Sources/Nimble/Matchers/EndWith.swift
+2 −2 Sources/Nimble/Matchers/Equal.swift
+23 −17 Sources/Nimble/Matchers/HaveCount.swift
+7 −8 Sources/Nimble/Matchers/Match.swift
+32 −14 Sources/Nimble/Matchers/MatchError.swift
+2 −2 Sources/Nimble/Matchers/MatcherProtocols.swift
+4 −2 Sources/Nimble/Matchers/PostNotification.swift
+10 −6 Sources/Nimble/Matchers/Predicate.swift
+18 −12 Sources/Nimble/Matchers/RaisesException.swift
+6 −31 Sources/Nimble/Matchers/SatisfyAllOf.swift
+6 −31 Sources/Nimble/Matchers/SatisfyAnyOf.swift
+12 −16 Sources/Nimble/Matchers/ThrowAssertion.swift
+45 −39 Sources/Nimble/Matchers/ThrowError.swift
+4 −0 Sources/Nimble/Utils/Await.swift
+16 −10 Sources/Nimble/Utils/Stringers.swift
+0 −9 Sources/NimbleObjectiveC/CurrentTestCaseTracker.h
+5 −8 Sources/NimbleObjectiveC/DSL.m
+1 −1 Sources/NimbleObjectiveC/NMBExceptionCapture.m
+5 −0 Sources/NimbleObjectiveC/NMBStringify.m
+6 −1 Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m
+6 −6 Tests/NimbleTests/Helpers/utils.swift
+1 −1 Tests/NimbleTests/Matchers/MatchErrorTest.swift
+7 −1 Tests/NimbleTests/Matchers/ThrowAssertionTest.swift
+11 −2 Tests/NimbleTests/Matchers/ThrowErrorTest.swift
+33 −0 Tests/NimbleTests/SynchronousTest.swift
+1 −1 test
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Quick
Submodule Quick updated 56 files
+2 −2 .gitignore
+9 −5 .travis.yml
+1 −0 Documentation/README.md
+2 −2 Documentation/en-us/ConfiguringQuick.md
+14 −14 Documentation/en-us/NimbleAssertions.md
+1 −1 Documentation/en-us/QuickExamplesAndGroups.md
+75 −0 Documentation/en-us/TestingApps.md
+14 −14 Documentation/ja/NimbleAssertions.md
+1 −1 Documentation/ja/QuickExamplesAndGroups.md
+203 −0 Documentation/ko-kr/ArrangeActAssert.md
+80 −0 Documentation/ko-kr/BehavioralTesting.md
+99 −0 Documentation/ko-kr/ConfiguringQuick.md
+25 −0 Documentation/ko-kr/InstallingFileTemplates.md
+141 −0 Documentation/ko-kr/InstallingQuick.md
+25 −0 Documentation/ko-kr/MoreResources.md
+97 −0 Documentation/ko-kr/NimbleAssertions.md
+462 −0 Documentation/ko-kr/QuickExamplesAndGroups.md
+49 −0 Documentation/ko-kr/QuickInObjectiveC.md
+35 −0 Documentation/ko-kr/README.md
+80 −0 Documentation/ko-kr/SettingUpYourXcodeProject.md
+116 −0 Documentation/ko-kr/SharedExamples.md
+129 −0 Documentation/ko-kr/TestUsingTestDoubles.md
+173 −0 Documentation/ko-kr/TestingApps.md
+10 −0 Documentation/ko-kr/Troubleshooting.md
+12 −12 Documentation/zh-cn/NimbleAssertions.md
+1 −1 Documentation/zh-cn/QuickExamplesAndGroups.md
+1 −1 Externals/Nimble
+1 −1 Gemfile
+40 −36 Gemfile.lock
+16 −0 Package.resolved
+1 −1 [email protected]
+6 −2 Quick.podspec
+59 −36 Quick.xcodeproj/project.pbxproj
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-iOS.xcscheme
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-macOS.xcscheme
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-tvOS.xcscheme
+8 −0 Quick.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+5 −0 Rakefile
+1 −1 Sources/Quick/Behavior.swift
+3 −3 Sources/Quick/Configuration/QuickConfiguration.swift
+9 −4 Sources/Quick/DSL/World+DSL.swift
+3 −0 Sources/Quick/Example.swift
+19 −3 Sources/Quick/NSString+C99ExtendedIdentifier.swift
+14 −2 Sources/Quick/QuickSpec.swift
+1 −1 Sources/Quick/World.swift
+6 −1 Sources/QuickObjectiveC/Configuration/QuickConfiguration.m
+6 −2 Sources/QuickObjectiveC/DSL/QCKDSL.m
+0 −20 Sources/QuickObjectiveC/DSL/World+DSL.h
+6 −0 Sources/QuickObjectiveC/QuickSpec.h
+11 −3 Sources/QuickObjectiveC/QuickSpec.m
+0 −18 Sources/QuickObjectiveC/World.h
+5 −0 Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m
+25 −0 Tests/QuickTests/QuickTests/FunctionalTests/CurrentSpecTests.swift
+0 −1 Tests/QuickTests/QuickTests/Helpers/QCKSpecRunner.m
+7 −1 Tests/QuickTests/QuickTests/Helpers/QuickSpec+QuickSpec_MethodList.h
+5 −13 Tests/QuickTests/QuickTests/Helpers/QuickSpec+QuickSpec_MethodList.m
2 changes: 1 addition & 1 deletion External/libgit2
Submodule libgit2 updated 6582 files
2 changes: 1 addition & 1 deletion ObjectiveGit/Categories/NSData+Git.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ - (BOOL)git_getOid:(git_oid *)oid error:(NSError **)error {
if ([self length] != sizeof(git_oid)) {
if (error != NULL) {
*error = [NSError errorWithDomain:GTGitErrorDomain
code:GITERR_INVALID
code:GIT_ERROR_INVALID
userInfo:
[NSDictionary dictionaryWithObject:@"can't extract oid from data of incorrect length"
forKey:NSLocalizedDescriptionKey]];
Expand Down
4 changes: 2 additions & 2 deletions ObjectiveGit/Categories/NSError+Git.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ + (NSError *)git_errorFor:(int)code {
}

+ (NSString *)git_descriptionForErrorCode:(int)code {
const git_error *gitLastError = giterr_last();
const git_error *gitLastError = git_error_last();
if (gitLastError != NULL) {
return @(gitLastError->message);
} else if (code == GITERR_OS) {
} else if (code == GIT_ERROR_OS) {
return @(strerror(errno));
} else {
return nil;
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTBlob.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ - (instancetype)initWithOid:(const git_oid *)oid inRepository:(GTRepository *)re
NSParameterAssert(repository != nil);

git_object *obj;
int gitError = git_object_lookup(&obj, repository.git_repository, oid, (git_otype) GTObjectTypeBlob);
int gitError = git_object_lookup(&obj, repository.git_repository, oid, (git_object_t) GTObjectTypeBlob);
if (gitError < GIT_OK) {
if (error != NULL) {
*error = [NSError git_errorFor:gitError description:@"Failed to lookup blob"];
Expand Down
4 changes: 2 additions & 2 deletions ObjectiveGit/GTCredential.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int GTCredentialAcquireCallback(git_cred **git_cred, const char *url, const char
GTCredentialProvider *provider = info->credProvider;

if (provider == nil) {
giterr_set_str(GIT_EUSER, "No GTCredentialProvider set, but authentication was requested.");
git_error_set_str(GIT_EUSER, "No GTCredentialProvider set, but authentication was requested.");
return GIT_ERROR;
}

Expand All @@ -114,7 +114,7 @@ int GTCredentialAcquireCallback(git_cred **git_cred, const char *url, const char

GTCredential *cred = [provider credentialForType:(GTCredentialType)allowed_types URL:URL userName:userName];
if (cred == nil) {
giterr_set_str(GIT_EUSER, "GTCredentialProvider failed to provide credentials.");
git_error_set_str(GIT_EUSER, "GTCredentialProvider failed to provide credentials.");
return GIT_ERROR;
}

Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTDiffPatch.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (NSData *)patchData {
git_patch_to_buf(&buf, self.git_patch);

NSData *buffer = [[NSData alloc] initWithBytes:buf.ptr length:buf.size];
git_buf_free(&buf);
git_buf_dispose(&buf);

return buffer;
}
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTIndexEntry.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ + (instancetype)objectWithIndexEntry:(GTIndexEntry *)indexEntry error:(NSError *

- (instancetype)initWithIndexEntry:(GTIndexEntry *)indexEntry error:(NSError **)error {
git_object *obj;
int gitError = git_object_lookup(&obj, indexEntry.repository.git_repository, indexEntry.OID.git_oid, (git_otype)GTObjectTypeAny);
int gitError = git_object_lookup(&obj, indexEntry.repository.git_repository, indexEntry.OID.git_oid, (git_object_t)GTObjectTypeAny);

if (gitError < GIT_OK) {
if (error != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTNote.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ + (NSString *)defaultReferenceNameForRepository:(GTRepository *)repository error
if (error != NULL) *error = [NSError git_errorFor:GIT_ERROR description:@"Unable to get default git notes reference name"];
}

git_buf_free(&default_ref_name);
git_buf_dispose(&default_ref_name);

return noteRef;
}
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTOID.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ + (instancetype)OIDByHashingData:(NSData *)data type:(GTObjectType)type error:(N
NSParameterAssert(data != nil);

git_oid oid;
int gitError = git_odb_hash(&oid, data.bytes, data.length, (git_otype)type);
int gitError = git_odb_hash(&oid, data.bytes, data.length, (git_object_t)type);
if (gitError != GIT_OK) {
if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to hash"];
return nil;
Expand Down
18 changes: 8 additions & 10 deletions ObjectiveGit/GTObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,14 @@
#import "git2/types.h"

typedef NS_ENUM(int, GTObjectType) {
GTObjectTypeAny = GIT_OBJ_ANY, /**< Object can be any of the following */
GTObjectTypeBad = GIT_OBJ_BAD, /**< Object is invalid. */
GTObjectTypeExt1 = GIT_OBJ__EXT1, /**< Reserved for future use. */
GTObjectTypeCommit = GIT_OBJ_COMMIT, /**< A commit object. */
GTObjectTypeTree = GIT_OBJ_TREE, /**< A tree (directory listing) object. */
GTObjectTypeBlob = GIT_OBJ_BLOB, /**< A file revision object. */
GTObjectTypeTag = GIT_OBJ_TAG, /**< An annotated tag object. */
GTObjectTypeExt2 = GIT_OBJ__EXT2, /**< Reserved for future use. */
GTObjectTypeOffsetDelta = GIT_OBJ_OFS_DELTA,/**< A delta, base is given by an offset. */
GTObjectTypeRefDelta = GIT_OBJ_REF_DELTA, /**< A delta, base is given by object id. */
GTObjectTypeAny = GIT_OBJECT_ANY, /**< Object can be any of the following */
GTObjectTypeBad = GIT_OBJECT_INVALID, /**< Object is invalid. */
GTObjectTypeCommit = GIT_OBJECT_COMMIT, /**< A commit object. */
GTObjectTypeTree = GIT_OBJECT_TREE, /**< A tree (directory listing) object. */
GTObjectTypeBlob = GIT_OBJECT_BLOB, /**< A file revision object. */
GTObjectTypeTag = GIT_OBJECT_TAG, /**< An annotated tag object. */
GTObjectTypeOffsetDelta = GIT_OBJECT_OFS_DELTA,/**< A delta, base is given by an offset. */
GTObjectTypeRefDelta = GIT_OBJECT_REF_DELTA, /**< A delta, base is given by object id. */
};

@class GTRepository;
Expand Down
14 changes: 7 additions & 7 deletions ObjectiveGit/GTObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,26 @@ - (id)initWithObj:(git_object *)object inRepository:(GTRepository *)repo {
NSAssert(object_repo == repo.git_repository, @"object %p doesn't belong to repo %@", object, repo);

Class objectClass = nil;
git_otype t = git_object_type(object);
git_object_t t = git_object_type(object);
switch (t) {
case GIT_OBJ_COMMIT:
case GIT_OBJECT_COMMIT:
objectClass = [GTCommit class];
break;
case GIT_OBJ_TREE:
case GIT_OBJECT_TREE:
objectClass = [GTTree class];
break;
case GIT_OBJ_BLOB:
case GIT_OBJECT_BLOB:
objectClass = [GTBlob class];
break;
case GIT_OBJ_TAG:
case GIT_OBJECT_TAG:
objectClass = [GTTag class];
break;
default:
break;
}

if (!objectClass) {
NSLog(@"Unknown git_otype %s (%d)", git_object_type2string(t), (int)t);
NSLog(@"Unknown git_object_t %s (%d)", git_object_type2string(t), (int)t);
return nil;
}

Expand Down Expand Up @@ -149,7 +149,7 @@ - (GTOdbObject *)odbObjectWithError:(NSError **)error {

- (id)objectByPeelingToType:(GTObjectType)type error:(NSError **)error {
git_object *peeled = NULL;
int gitError = git_object_peel(&peeled, self.git_object, (git_otype)type);
int gitError = git_object_peel(&peeled, self.git_object, (git_object_t)type);
if (gitError != GIT_OK) {
if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Cannot peel object"];
return nil;
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTObjectDatabase.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ - (GTOID *)writeData:(NSData *)data type:(GTObjectType)type error:(NSError **)er
NSParameterAssert(data != nil);

git_odb_stream *stream;
int gitError = git_odb_open_wstream(&stream, self.git_odb, data.length, (git_otype)type);
int gitError = git_odb_open_wstream(&stream, self.git_odb, data.length, (git_object_t)type);
@onExit {
if (stream != NULL) git_odb_stream_free(stream);
};
Expand Down
6 changes: 3 additions & 3 deletions ObjectiveGit/GTReference.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ typedef NS_ENUM(NSInteger, GTReferenceErrorCode) {
};

typedef NS_OPTIONS(NSInteger, GTReferenceType) {
GTReferenceTypeInvalid = GIT_REF_INVALID, /** Invalid reference */
GTReferenceTypeOid = GIT_REF_OID, /** A reference which points at an object id */
GTReferenceTypeSymbolic = GIT_REF_SYMBOLIC, /** A reference which points at another reference */
GTReferenceTypeInvalid = GIT_REFERENCE_INVALID, /** Invalid reference */
GTReferenceTypeDirect = GIT_REFERENCE_DIRECT, /** A reference which points at an object id */
GTReferenceTypeSymbolic = GIT_REFERENCE_SYMBOLIC, /** A reference which points at another reference */
};

NS_ASSUME_NONNULL_BEGIN
Expand Down
8 changes: 4 additions & 4 deletions ObjectiveGit/GTReference.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ @interface GTReference ()
case GTReferenceTypeInvalid:
return @"invalid";

case GTReferenceTypeOid:
case GTReferenceTypeDirect:
return @"direct";

case GTReferenceTypeSymbolic:
Expand Down Expand Up @@ -144,7 +144,7 @@ - (GTReferenceType)referenceType {
}

- (id)unresolvedTarget {
if (self.referenceType == GTReferenceTypeOid) {
if (self.referenceType == GTReferenceTypeDirect) {
const git_oid *oid = git_reference_target(self.git_reference);
if (oid == NULL) return nil;

Expand All @@ -160,7 +160,7 @@ - (id)unresolvedTarget {

- (id)resolvedTarget {
git_object *obj;
if (git_reference_peel(&obj, self.git_reference, GIT_OBJ_ANY) != GIT_OK) {
if (git_reference_peel(&obj, self.git_reference, GIT_OBJECT_ANY) != GIT_OK) {
return nil;
}

Expand All @@ -181,7 +181,7 @@ - (GTReference *)referenceByUpdatingTarget:(NSString *)newTarget message:(NSStri

int gitError;
git_reference *newRef = NULL;
if (git_reference_type(self.git_reference) == GIT_REF_OID) {
if (git_reference_type(self.git_reference) == GIT_REFERENCE_DIRECT) {
GTOID *oid = [[GTOID alloc] initWithSHA:newTarget error:error];
if (oid == nil) return nil;

Expand Down
6 changes: 3 additions & 3 deletions ObjectiveGit/GTRepository.m
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ + (instancetype _Nullable)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NS
- (id)lookUpObjectByGitOid:(const git_oid *)oid objectType:(GTObjectType)type error:(NSError **)error {
git_object *obj;

int gitError = git_object_lookup(&obj, self.git_repository, oid, (git_otype)type);
int gitError = git_object_lookup(&obj, self.git_repository, oid, (git_object_t)type);
if (gitError < GIT_OK) {
if (error != NULL) {
char oid_str[GIT_OID_HEXSZ+1];
Expand Down Expand Up @@ -683,13 +683,13 @@ - (NSString *)preparedMessageWithError:(NSError * __autoreleasing *)error {
int errorCode = git_repository_message(&msg, self.git_repository);
if (errorCode != GIT_OK) {
setErrorFromCode(errorCode);
git_buf_free(&msg);
git_buf_dispose(&msg);
return nil;
}

NSString *message = [[NSString alloc] initWithBytes:msg.ptr length:msg.size encoding:NSUTF8StringEncoding];

git_buf_free(&msg);
git_buf_dispose(&msg);

return message;
}
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTTreeBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ - (GTTree *)writeTree:(NSError **)error {
}

git_object *object = NULL;
status = git_object_lookup(&object, self.repository.git_repository, &treeOid, GIT_OBJ_TREE);
status = git_object_lookup(&object, self.repository.git_repository, &treeOid, GIT_OBJECT_TREE);
if (status != GIT_OK) {
if (error != NULL) *error = [NSError git_errorFor:status description:@"Failed to lookup tree in repository."];
return nil;
Expand Down
6 changes: 3 additions & 3 deletions ObjectiveGitTests/GTReferenceSpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
expect(ref).notTo(beNil());
expect(error).to(beNil());

expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeOid, @"refs/heads/master");
expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeDirect, @"refs/heads/master");
});

it(@"should return a valid reference to a tag", ^{
Expand All @@ -144,7 +144,7 @@
expect(ref).notTo(beNil());
expect(error).to(beNil());

expectValidReference(ref, @"5b5b025afb0b4c913b4c338a42934a3863bf3644", GTReferenceTypeOid, @"refs/tags/v0.9");
expectValidReference(ref, @"5b5b025afb0b4c913b4c338a42934a3863bf3644", GTReferenceTypeDirect, @"refs/tags/v0.9");
});
});

Expand All @@ -170,7 +170,7 @@
expect(error).to(beNil());
expect(ref).notTo(beNil());

expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeOid, @"refs/heads/unit_test");
expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeDirect, @"refs/heads/unit_test");
});
});

Expand Down
6 changes: 3 additions & 3 deletions ObjectiveGitTests/GTRepositorySpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
expect(head).notTo(beNil());
expect(error).to(beNil());
expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid)));
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeDirect)));
});

it(@"should handle bare clones", ^{
Expand All @@ -139,7 +139,7 @@
expect(head).notTo(beNil());
expect(error).to(beNil());
expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid)));
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeDirect)));
});

it(@"should have set a valid remote URL", ^{
Expand Down Expand Up @@ -212,7 +212,7 @@
expect(head).notTo(beNil());
expect(error).to(beNil());
expect(head.targetOID.SHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a"));
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid)));
expect(@(head.referenceType)).to(equal(@(GTReferenceTypeDirect)));
});

it(@"should fail to return HEAD for an unborn repo", ^{
Expand Down