|
23 | 23 |
|
24 | 24 | beforeEach(^{ |
25 | 25 | repository = self.testAppFixtureRepository; |
26 | | - targetFileURL = [repository.fileURL URLByAppendingPathComponent:@"main.m"]; |
| 26 | + targetFileURL = [repository.workingDirectoryURL URLByAppendingPathComponent:@"main.m"]; |
27 | 27 | expect(repository).notTo(beNil()); |
28 | 28 | }); |
29 | 29 |
|
|
73 | 73 | }); |
74 | 74 |
|
75 | 75 | it(@"should recognize copied files", ^{ |
76 | | - NSURL *copyLocation = [repository.fileURL URLByAppendingPathComponent:@"main2.m"]; |
| 76 | + NSURL *copyLocation = [repository.workingDirectoryURL URLByAppendingPathComponent:@"main2.m"]; |
77 | 77 | expect(@([NSFileManager.defaultManager copyItemAtURL:targetFileURL toURL:copyLocation error:&err])).to(beTruthy()); |
78 | 78 | expect(err).to(beNil()); |
79 | 79 | updateIndexForSubpathAndExpectStatus(copyLocation.lastPathComponent, GTDeltaTypeCopied); |
|
86 | 86 | }); |
87 | 87 |
|
88 | 88 | it(@"should recognize renamed files", ^{ |
89 | | - NSURL *moveLocation = [repository.fileURL URLByAppendingPathComponent:@"main-moved.m"]; |
| 89 | + NSURL *moveLocation = [repository.workingDirectoryURL URLByAppendingPathComponent:@"main-moved.m"]; |
90 | 90 | expect(@([NSFileManager.defaultManager moveItemAtURL:targetFileURL toURL:moveLocation error:&err])).to(beTruthy()); |
91 | 91 | expect(err).to(beNil()); |
92 | 92 | expectSubpathToHaveWorkDirStatus(moveLocation.lastPathComponent, GTDeltaTypeRenamed); |
|
108 | 108 |
|
109 | 109 | it(@"should report file should be ignored", ^{ |
110 | 110 | __block NSError *err = nil; |
111 | | - NSURL *fileURL = [repository.fileURL URLByAppendingPathComponent:@".DS_Store"]; |
| 111 | + NSURL *fileURL = [repository.workingDirectoryURL URLByAppendingPathComponent:@".DS_Store"]; |
112 | 112 | BOOL success = NO; |
113 | 113 | BOOL shouldIgnore = [repository shouldFileBeIgnored:fileURL success:&success error:&err]; |
114 | 114 | expect(@(success)).to(beTrue()); |
|
118 | 118 |
|
119 | 119 | it(@"should report file should be ignored (convenience wrapper)", ^{ |
120 | 120 | __block NSError *err = nil; |
121 | | - NSURL *fileURL = [repository.fileURL URLByAppendingPathComponent:@".DS_Store"]; |
| 121 | + NSURL *fileURL = [repository.workingDirectoryURL URLByAppendingPathComponent:@".DS_Store"]; |
122 | 122 | GTFileIgnoreState ignore = [repository shouldIgnoreFileURL:fileURL error:&err]; |
123 | 123 | expect(@(ignore)).to(equal(@(GTFileIgnoreStateShouldIgnore))); |
124 | 124 | expect(err).to(beNil()); |
|
0 commit comments