diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /spec/lib/gitlab/conflict/file_spec.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/lib/gitlab/conflict/file_spec.rb')
-rw-r--r-- | spec/lib/gitlab/conflict/file_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/conflict/file_spec.rb b/spec/lib/gitlab/conflict/file_spec.rb index 46e5334cd81..f8a007cdd75 100644 --- a/spec/lib/gitlab/conflict/file_spec.rb +++ b/spec/lib/gitlab/conflict/file_spec.rb @@ -298,12 +298,12 @@ RSpec.describe Gitlab::Conflict::File do end it 'creates context sections of the correct length' do - expect(sections[0][:lines].reject(&:type).length).to eq(3) - expect(sections[2][:lines].reject(&:type).length).to eq(3) - expect(sections[3][:lines].reject(&:type).length).to eq(3) - expect(sections[5][:lines].reject(&:type).length).to eq(3) - expect(sections[6][:lines].reject(&:type).length).to eq(3) - expect(sections[8][:lines].reject(&:type).length).to eq(1) + expect(sections[0][:lines].count { |line| line.type.nil? }).to eq(3) + expect(sections[2][:lines].count { |line| line.type.nil? }).to eq(3) + expect(sections[3][:lines].count { |line| line.type.nil? }).to eq(3) + expect(sections[5][:lines].count { |line| line.type.nil? }).to eq(3) + expect(sections[6][:lines].count { |line| line.type.nil? }).to eq(3) + expect(sections[8][:lines].count { |line| line.type.nil? }).to eq(1) end end end |