summaryrefslogtreecommitdiff
path: root/spec/models/repository_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 00ffc3cae54..a8cdebd2b9c 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -2366,7 +2366,7 @@ describe Repository do
end
end
- describe '#tree' do
+ shared_examples '#tree' do
context 'using a non-existing repository' do
before do
allow(repository).to receive(:head_commit).and_return(nil)
@@ -2384,10 +2384,17 @@ describe Repository do
context 'using an existing repository' do
it 'returns a Tree' do
expect(repository.tree(:head)).to be_an_instance_of(Tree)
+ expect(repository.tree('v1.1.1')).to be_an_instance_of(Tree)
end
end
end
+ it_behaves_like '#tree'
+
+ describe '#tree? with Rugged enabled', :enable_rugged do
+ it_behaves_like '#tree'
+ end
+
describe '#size' do
context 'with a non-existing repository' do
it 'returns 0' do