diff options
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 |