File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 99
99
expect ([tree entryWithName: @" _does not exist" ]).to (beNil ());
100
100
});
101
101
102
+ describe (@" fetching entries from paths" , ^{
103
+ it (@" should be able to fetch existing paths" ,^{
104
+ NSError *error = nil ;
105
+ GTTreeEntry *entry;
106
+
107
+ entry = [tree entryWithPath: @" README" error: &error];
108
+ expect (error).to (beNil ());
109
+ expect (entry).notTo (beNil ());
110
+
111
+ entry = [tree entryWithPath: @" subdir/README" error: &error];
112
+ expect (error).to (beNil ());
113
+ expect (entry).notTo (beNil ());
114
+ });
115
+
116
+ it (@" should return nil and fill error for non-existent paths" ,^{
117
+ NSError *error = nil ;
118
+ GTTreeEntry *entry;
119
+
120
+ entry = [tree entryWithPath: @" does/not/exist" error: &error];
121
+ expect (error).notTo (beNil ());
122
+ expect (entry).to (beNil ());
123
+ });
124
+ });
125
+
102
126
afterEach (^{
103
127
[self tearDown ];
104
128
});
You can’t perform that action at this time.
0 commit comments