Fix RSpec

This commit is contained in:
Kim "BKC" Carlbäcker 2017-04-26 18:33:48 +02:00
parent 6f89bd3628
commit a998710a3b

View file

@ -1074,20 +1074,8 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
describe '#branch_count' do
before(:each) do
valid_ref = double(:ref)
invalid_ref = double(:ref)
allow(valid_ref).to receive_messages(name: 'master', target: double(:target))
allow(invalid_ref).to receive_messages(name: 'bad-branch')
allow(invalid_ref).to receive(:target) { raise Rugged::ReferenceError }
allow(repository.rugged).to receive_messages(branches: [valid_ref, invalid_ref])
end
it 'returns the number of branches' do
expect(repository.branch_count).to eq(1)
expect(repository.branch_count).to eq(9)
end
end