File: forge_spec.rb

package info (click to toggle)
librarian-puppet 6.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 524 kB
  • sloc: ruby: 1,432; sh: 37; makefile: 9
file content (28 lines) | stat: -rw-r--r-- 675 bytes parent folder | download
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
# frozen_string_literal: true

require 'librarian/puppet/source/forge'
require 'librarian/puppet/environment'
require 'librarian/puppet/extension'

include Librarian::Puppet::Source

describe Forge do
  subject { Forge.new(environment, uri) }

  let(:environment) { Librarian::Puppet::Environment.new }
  let(:uri) { 'https://forgeapi.puppet.com' }

  describe '#manifests' do
    let(:manifests) { [] }

    before do
      expect_any_instance_of(Librarian::Puppet::Source::Forge::RepoV3).to receive(:get_versions).at_least(:once) {
        manifests
      }
    end

    it 'returns the manifests' do
      expect(subject.manifests('x')).to eq(manifests)
    end
  end
end