summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-04-26 18:33:48 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-04-28 13:07:54 +0200
commita998710a3b2d4d2f5fa7dbdaf4ae468cd304730c (patch)
tree8115a99bc5ab1fcb9f2c5ce41b6d692b3bb491f2
parent6f89bd3628322d0c17f97163d060e6ef7238de3c (diff)
downloadgitlab-ce-a998710a3b2d4d2f5fa7dbdaf4ae468cd304730c.tar.gz
Fix RSpec
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index f88653cb1fe..1b78910fa3c 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -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