gitlab-org--gitlab-foss/spec/models/blob_viewer/podspec_spec.rb
2017-05-17 14:10:00 -05:00

25 lines
604 B
Ruby

require 'spec_helper'
describe BlobViewer::Podspec, model: true do
include FakeBlobHelpers
let(:project) { build(:project) }
let(:data) do
<<-SPEC.strip_heredoc
Pod::Spec.new do |spec|
spec.name = 'Reachability'
spec.version = '3.1.0'
end
SPEC
end
let(:blob) { fake_blob(path: 'Reachability.podspec', 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('Reachability')
end
end
end