Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-05-18 14:01:27 +0300
committerDouwe Maan <douwe@selenight.nl>2018-05-22 13:09:53 +0300
commit83cda43a00652d992cb2a47920db81cc0dae23e4 (patch)
tree5635981b7cf741892659fecb2fa8ca09f7f57e32 /spec/models/repository_spec.rb
parent83660e5712dde52767a0a22023785b9006b81c21 (diff)
Fix Xcode project detection by looking for dirs instead of files
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb14
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