2019-03-30 07:23:56 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-17 16:27:30 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-06-29 04:13:10 +00:00
|
|
|
describe BlobViewer::Podspec do
|
2017-05-17 16:27:30 +00:00
|
|
|
include FakeBlobHelpers
|
|
|
|
|
2017-08-02 19:55:11 +00:00
|
|
|
let(:project) { build_stubbed(:project) }
|
2017-05-17 16:27:30 +00:00
|
|
|
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) }
|
2019-12-19 00:08:01 +00:00
|
|
|
|
2017-05-17 16:27:30 +00:00
|
|
|
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
|