debian-mirror-gitlab/spec/models/blob_viewer/podspec_json_spec.rb

28 lines
595 B
Ruby
Raw Normal View History

2019-05-18 00:54:41 +05:30
# frozen_string_literal: true
2017-09-10 17:25:29 +05:30
require 'spec_helper'
describe BlobViewer::PodspecJson do
include FakeBlobHelpers
let(:project) { build_stubbed(:project) }
let(:data) do
<<-SPEC.strip_heredoc
{
"name": "AFNetworking",
"version": "2.0.0"
}
SPEC
end
let(:blob) { fake_blob(path: 'AFNetworking.podspec.json', 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('AFNetworking')
end
end
end