Skip to content

Commit 20804e8

Browse files
committed
Add Libgit2FeaturesSpec
1 parent 8887a2a commit 20804e8

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

ObjectiveGitFramework.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@
311311
DD3D9513182A81E1004AF532 /* GTBlame.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3D9511182A81E1004AF532 /* GTBlame.m */; };
312312
DD3D951C182AB25C004AF532 /* GTBlameHunk.h in Headers */ = {isa = PBXBuildFile; fileRef = DD3D951A182AB25C004AF532 /* GTBlameHunk.h */; settings = {ATTRIBUTES = (Public, ); }; };
313313
DD3D951D182AB25C004AF532 /* GTBlameHunk.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3D951B182AB25C004AF532 /* GTBlameHunk.m */; };
314+
F879D8311B4B788F002D5C07 /* Libgit2FeaturesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = F879D82F1B4B77F4002D5C07 /* Libgit2FeaturesSpec.m */; };
314315
F8E4A2911A170CA6006485A8 /* GTRemotePushSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = F8E4A2901A170CA6006485A8 /* GTRemotePushSpec.m */; };
315316
/* End PBXBuildFile section */
316317

@@ -573,6 +574,7 @@
573574
DD3D951B182AB25C004AF532 /* GTBlameHunk.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBlameHunk.m; sourceTree = "<group>"; };
574575
E46931A7172740D300F2077D /* update_libgit2 */ = {isa = PBXFileReference; lastKnownFileType = text; name = update_libgit2; path = script/update_libgit2; sourceTree = "<group>"; };
575576
E46931A8172740D300F2077D /* update_libgit2_ios */ = {isa = PBXFileReference; lastKnownFileType = text; name = update_libgit2_ios; path = script/update_libgit2_ios; sourceTree = "<group>"; };
577+
F879D82F1B4B77F4002D5C07 /* Libgit2FeaturesSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Libgit2FeaturesSpec.m; sourceTree = "<group>"; };
576578
F8E4A2901A170CA6006485A8 /* GTRemotePushSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTRemotePushSpec.m; sourceTree = "<group>"; };
577579
/* End PBXFileReference section */
578580

@@ -746,6 +748,7 @@
746748
88234B2518F2FE260039972E /* GTRepositoryResetSpec.m */,
747749
8870390A1975E3F2004118D7 /* GTDiffDeltaSpec.m */,
748750
88E353051982EA6B0051001F /* GTRepositoryAttributesSpec.m */,
751+
F879D82F1B4B77F4002D5C07 /* Libgit2FeaturesSpec.m */,
749752
);
750753
path = ObjectiveGitTests;
751754
sourceTree = "<group>";
@@ -1272,6 +1275,7 @@
12721275
307623AB17C6C8BD00E2CDF1 /* NSArray+StringArraySpec.m in Sources */,
12731276
8832811F173D8816006D7DCF /* GTIndexSpec.m in Sources */,
12741277
D0F4E28A17C7F24200BBDE30 /* NSErrorGitSpec.m in Sources */,
1278+
F879D8311B4B788F002D5C07 /* Libgit2FeaturesSpec.m in Sources */,
12751279
88328128173D8A64006D7DCF /* GTTreeSpec.m in Sources */,
12761280
88E353061982EA6B0051001F /* GTRepositoryAttributesSpec.m in Sources */,
12771281
88234B2618F2FE260039972E /* GTRepositoryResetSpec.m in Sources */,
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// Libgit2FeaturesSpec.m
3+
// ObjectiveGitFramework
4+
//
5+
// Created by Ben Chatelain on 7/6/15.
6+
// Copyright (c) 2015 GitHub, Inc. All rights reserved.
7+
//
8+
9+
#import <Nimble/Nimble.h>
10+
#import <ObjectiveGit/ObjectiveGit.h>
11+
#import <Quick/Quick.h>
12+
13+
#import "QuickSpec+GTFixtures.h"
14+
15+
QuickSpecBegin(Libgit2FeaturesSpec)
16+
17+
describe(@"libgit", ^{
18+
19+
__block git_feature_t git_features = 0;
20+
21+
beforeEach(^{
22+
git_features = git_libgit2_features();
23+
});
24+
25+
it(@"should be built with THREADS enabled", ^{
26+
expect(@(git_features & GIT_FEATURE_THREADS)).to(beTruthy());
27+
});
28+
29+
it(@"should be built with HTTPS enabled", ^{
30+
expect(@(git_features & GIT_FEATURE_HTTPS)).to(beTruthy());
31+
});
32+
33+
it(@"should be built with SSH enabled", ^{
34+
expect(@(git_features & GIT_FEATURE_SSH)).to(beTruthy());
35+
});
36+
37+
});
38+
39+
QuickSpecEnd

0 commit comments

Comments
 (0)