File: facts_lookup_spec.rb

package info (click to toggle)
ruby-rspec-puppet 4.0.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,444 kB
  • sloc: ruby: 6,377; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 409 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'rspec-puppet'

describe 'structured_facts::lookup' do
  context 'with one set of values' do
    let(:facts) { { 'os' => { 'family' => 'RedHat' } } }

    it { is_expected.to run.and_return('RedHat') }
  end

  context 'with a different set of values' do
    let(:facts) { { 'os' => { 'family' => 'Suse' } } }

    it { is_expected.to run.and_return('Suse') }
  end
end