From 87657d66663cea22ae1740b47061982b2e2b8e2c Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 7 Jun 2024 14:06:00 +0200 Subject: [PATCH] Add tests for symbol conversion --- spec/facter_db_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/facter_db_spec.rb b/spec/facter_db_spec.rb index 82b01626..5a4a8be8 100644 --- a/spec/facter_db_spec.rb +++ b/spec/facter_db_spec.rb @@ -325,6 +325,19 @@ context 'without parameters' do include_examples 'returns a result' + it 'returns symbols as keys in factsets' do + result.each do |factset| + expect(factset.keys).to all(be_an_instance_of(Symbol)) + end + end + end + context 'with stringified output' do + let(:symbolize_keys) {false} + it 'returns strings as keys in factsets' do + result.each do |factset| + expect(factset.keys).to all(be_an_instance_of(String)) + end + end end context 'with an Array filter' do