gitlab-org--gitlab-foss/spec/models/blob_viewer/gemspec_spec.rb
Keifer Furzland 7e113b6824 Remove superfluous type defs in specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:52 +02:00

25 lines
601 B
Ruby

require 'spec_helper'
describe BlobViewer::Gemspec do
include FakeBlobHelpers
let(:project) { build(:project) }
let(:data) do
<<-SPEC.strip_heredoc
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "activerecord"
end
SPEC
end
let(:blob) { fake_blob(path: 'activerecord.gemspec', data: data) }
subject { described_class.new(blob) }
describe '#package_name' do
it 'returns the package name' do
expect(subject).to receive(:prepare!)
expect(subject.package_name).to eq('activerecord')
end
end
end