diff options
author | Robert Speicher <robert@gitlab.com> | 2018-05-22 17:03:30 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-05-22 17:03:30 +0000 |
commit | f8568baad50b415a5a923d149d9c7b15f9d064a7 (patch) | |
tree | 55d4fea4059fb06314cce30574aaf727dde74ab2 /spec | |
parent | 5045ca06ac9d18e7d69e8b73f41236b9664bd888 (diff) | |
parent | 83cda43a00652d992cb2a47920db81cc0dae23e4 (diff) | |
download | gitlab-ce-f8568baad50b415a5a923d149d9c7b15f9d064a7.tar.gz |
Merge branch 'dm-xcode-project-directory' into 'master'
Fix Xcode project detection by looking for dirs instead of files
See merge request gitlab-org/gitlab-ce!19035
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/repository_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 6bc148a1392..0ccf55bd895 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -2031,27 +2031,27 @@ describe Repository do describe '#xcode_project?' do before do - allow(repository).to receive(:tree).with(:head).and_return(double(:tree, blobs: [blob])) + allow(repository).to receive(:tree).with(:head).and_return(double(:tree, trees: [tree])) end - context 'when the root contains a *.xcodeproj file' do - let(:blob) { double(:blob, path: 'Foo.xcodeproj') } + context 'when the root contains a *.xcodeproj directory' do + let(:tree) { double(:tree, path: 'Foo.xcodeproj') } it 'returns true' do expect(repository.xcode_project?).to be_truthy end end - context 'when the root contains a *.xcworkspace file' do - let(:blob) { double(:blob, path: 'Foo.xcworkspace') } + context 'when the root contains a *.xcworkspace directory' do + let(:tree) { double(:tree, path: 'Foo.xcworkspace') } it 'returns true' do expect(repository.xcode_project?).to be_truthy end end - context 'when the root contains no XCode config file' do - let(:blob) { double(:blob, path: 'subdir/Foo.xcworkspace') } + context 'when the root contains no Xcode config directory' do + let(:tree) { double(:tree, path: 'Foo') } it 'returns false' do expect(repository.xcode_project?).to be_falsey |