Commit a998710a authored by Kim "BKC" Carlbäcker's avatar Kim "BKC" Carlbäcker

Fix RSpec

parent 6f89bd36
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment