diff --git a/spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb b/spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb index 3408af79..dcd2a992 100644 --- a/spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb +++ b/spec/unit/puppet-lint/plugins/legacy_facts/legacy_facts_spec.rb @@ -143,6 +143,14 @@ end end + context "with YAML string not containing legacy fact" do + let(:code) { 'some_key: "%{facts.os.name}"' } + + it 'does not detect any problems' do + expect(problems).to be_empty + end + end + context 'with YAML nested structure containing legacy fact' do let(:code) { "nested:\n value: \"%{::architecture}\"" }