diff --git a/spec/unit/puppet-lint/plugins/check_classes/variable_scope_spec.rb b/spec/unit/puppet-lint/plugins/check_classes/variable_scope_spec.rb index 73d2dd2f..1f848d08 100644 --- a/spec/unit/puppet-lint/plugins/check_classes/variable_scope_spec.rb +++ b/spec/unit/puppet-lint/plugins/check_classes/variable_scope_spec.rb @@ -239,11 +239,11 @@ class foo() { end end - context 'support the use of facts and trusted facts for Puppet 3.5 onwards' do + context 'support the use of facts and trusted facts' do let(:code) do <<-END class foo() { - if $facts['osfamily'] == 'redhat' or $trusted['osfamily'] == 'redhat' { + if $facts['os']['family'] == 'redhat' or $trusted['os']['family'] == 'redhat' { $redhat = true } } diff --git a/spec/unit/puppet-lint/plugins/check_whitespace/arrow_alignment_spec.rb b/spec/unit/puppet-lint/plugins/check_whitespace/arrow_alignment_spec.rb index ad38d36f..e904c861 100644 --- a/spec/unit/puppet-lint/plugins/check_whitespace/arrow_alignment_spec.rb +++ b/spec/unit/puppet-lint/plugins/check_whitespace/arrow_alignment_spec.rb @@ -477,7 +477,7 @@ class { 'some_class': context 'where the top level of the block has no parameters' do let(:code) do <<-END - case $::osfamily { + case $facts['os']['family'] { 'RedHat': { $datadir = $::operatingsystem ? { 'Amazon' => pick($datadir, 'value'), 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 8dd0d466..64311aa6 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 @@ -29,7 +29,7 @@ context "fact variable using legacy $facts['osfamily']" do let(:code) { "$facts['osfamily']" } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -37,7 +37,7 @@ context 'fact variable using legacy $::osfamily' do let(:code) { '$::osfamily' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -45,7 +45,7 @@ context 'fact variable using legacy $::blockdevice_sda_model' do let(:code) { '$::blockdevice_sda_model' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -53,7 +53,7 @@ context "fact variable using legacy $facts['ipaddress6_em2']" do let(:code) { "$facts['ipaddress6_em2']" } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -61,7 +61,7 @@ context 'fact variable using legacy $::zone_foobar_uuid' do let(:code) { '$::zone_foobar_uuid' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -69,7 +69,7 @@ context 'fact variable using legacy $::processor314' do let(:code) { '$::processor314' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -77,7 +77,7 @@ context 'fact variable using legacy $::sp_l3_cache' do let(:code) { '$::sp_l3_cache' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -85,7 +85,7 @@ context 'fact variable using legacy $::sshrsakey' do let(:code) { '$::sshrsakey' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -93,7 +93,7 @@ context 'fact variable in interpolated string "${::osfamily}"' do let(:code) { '"start ${::osfamily} end"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -101,7 +101,7 @@ context 'fact variable using legacy variable in double quotes "$::osfamily"' do let(:code) { '"$::osfamily"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end end @@ -168,7 +168,7 @@ let(:code) { "$facts['osfamily']" } let(:msg) { "legacy fact 'osfamily'" } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -210,7 +210,7 @@ let(:code) { '$::osfamily' } let(:msg) { "legacy fact 'osfamily'" } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -227,7 +227,7 @@ let(:code) { '$::sshrsakey' } let(:msg) { "legacy fact 'sshrsakey'" } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -243,7 +243,7 @@ context 'fact variable using legacy $::memoryfree_mb' do let(:code) { '$::memoryfree_mb' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -255,7 +255,7 @@ context 'fact variable using legacy $::blockdevice_sda_model' do let(:code) { '$::blockdevice_sda_model' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -267,7 +267,7 @@ context "fact variable using legacy $facts['ipaddress6_em2']" do let(:code) { "$facts['ipaddress6_em2']" } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -279,7 +279,7 @@ context 'fact variable using legacy $::zone_foobar_uuid' do let(:code) { '$::zone_foobar_uuid' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -291,7 +291,7 @@ context 'fact variable using legacy $::processor314' do let(:code) { '$::processor314' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -303,7 +303,7 @@ context 'fact variable using legacy $::sp_l3_cache' do let(:code) { '$::sp_l3_cache' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -315,7 +315,7 @@ context 'fact variable using legacy $::sshrsakey' do let(:code) { '$::sshrsakey' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -327,7 +327,7 @@ context 'fact variable in interpolated string "${::osfamily}"' do let(:code) { '"start ${::osfamily} end"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -339,7 +339,7 @@ context 'fact variable using legacy variable in double quotes "$::osfamily"' do let(:code) { '"$::osfamily"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -351,7 +351,7 @@ context 'fact variable using legacy variable in double quotes "$::gid"' do let(:code) { '"$::gid"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -363,7 +363,7 @@ context 'fact variable using legacy variable in double quotes "$::id"' do let(:code) { '"$::id"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -375,7 +375,7 @@ context 'fact variable using legacy variable in double quotes "$::lsbdistcodename"' do let(:code) { '"$::lsbdistcodename"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -387,7 +387,7 @@ context 'fact variable using legacy variable in double quotes "$::lsbdistdescription"' do let(:code) { '"$::lsbdistdescription"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -399,7 +399,7 @@ context 'fact variable using legacy variable in double quotes "$::lsbdistid"' do let(:code) { '"$::lsbdistid"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -411,7 +411,7 @@ context 'fact variable using legacy variable in double quotes "$::lsbdistrelease"' do let(:code) { '"$::lsbdistrelease"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -423,7 +423,7 @@ context 'fact variable using legacy variable in double quotes "$::lsbmajdistrelease"' do let(:code) { '"$::lsbmajdistrelease"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -435,7 +435,7 @@ context 'fact variable using legacy variable in double quotes "$::lsbminordistrelease"' do let(:code) { '"$::lsbminordistrelease"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -447,7 +447,7 @@ context 'fact variable using legacy variable in double quotes "$::lsbrelease"' do let(:code) { '"$::lsbrelease"' } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end @@ -459,7 +459,7 @@ context "fact variable using facts hash in double quotes \"$facts['lsbrelease']\"" do let(:code) { "\"${facts['lsbrelease']}\"" } - it 'onlies detect a single problem' do + it 'only detect a single problem' do expect(problems.size).to eq(1) end