diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-05-18 11:01:27 +0000 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2018-05-22 12:09:53 +0200 |
commit | 83cda43a00652d992cb2a47920db81cc0dae23e4 (patch) | |
tree | 5635981b7cf741892659fecb2fa8ca09f7f57e32 /spec/models | |
parent | 83660e5712dde52767a0a22023785b9006b81c21 (diff) | |
download | gitlab-ce-83cda43a00652d992cb2a47920db81cc0dae23e4.tar.gz |
Fix Xcode project detection by looking for dirs instead of filesdm-xcode-project-directory
Diffstat (limited to 'spec/models')
-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 ac8d9a32d4e..78d28179e64 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -2021,27 +2021,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 |