# frozen_string_literal: true describe '<%= os_name %> <%= camelcase_fact_name %>' do context '#call_the_resolver' do let(:value) { } let(:expected_resolved_fact) { double(Facter::ResolvedFact, name: '<%= fact_name %>', value: value) } subject(:fact) { Facter::<%= os_name %>::<%= camelcase_fact_name %>.new } before do expect().to receive(:resolve).with().and_return(value) expect(Facter::ResolvedFact).to receive(:new).with('<%= fact_name %>', value).and_return(expected_resolved_fact) end it 'returns <%= fact_name %> fact' do expect(fact.call_the_resolver).to eq(expected_resolved_fact) end end end