Sha256: 347558f1b7672ad50b0d74cf73bffcd6744137ff3bee36ce3b4e6eda4e456572
Contents?: true
Size: 790 Bytes
Versions: 124
Compression:
Stored size: 790 Bytes
Contents
require 'spec_helper' describe 'Puppet::FacterImpl' do subject(:facter_impl) { Puppet::FacterImpl.new } it { is_expected.to respond_to(:value) } it { is_expected.to respond_to(:add) } describe '.value' do let(:method_name) { :value } before { allow(Facter).to receive(method_name) } it 'delegates to Facter API' do facter_impl.value('test_fact') expect(Facter).to have_received(method_name).with('test_fact') end end describe '.add' do let(:block) { Proc.new { setcode 'test' } } let(:method_name) { :add } before { allow(Facter).to receive(method_name) } it 'delegates to Facter API' do facter_impl.add('test_fact', &block) expect(Facter).to have_received(method_name).with('test_fact', &block) end end end
Version data entries
124 entries across 124 versions & 1 rubygems