blob: cdeea4e874400d2c447a596e9338c5b538d180e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.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
|