spec/unit/chef/sugar/platform_spec.rb in chef-sugar-4.1.0 vs spec/unit/chef/sugar/platform_spec.rb in chef-sugar-4.2.0

- old
+ new

@@ -287,9 +287,21 @@ node = { 'platform' => 'ubuntu', 'platform_version' => '9.10' } expect(described_class.ubuntu_before_or_at_lucid?(node)).to be true end end + describe '#centos_final?' do + it 'returns true when the version is a subset of the major' do + node = { 'platform' => 'centos', 'platform_version' => '6.8' } + expect(described_class.centos_final?(node)).to be true + end + + it 'returns false when the version is not the major' do + node = { 'platform' => 'centos', 'platform_version' => '7.4' } + expect(described_class.centos_final?(node)).to be false + end + end + describe '#debian_wheezy?' do it 'returns true when the version is a subset of the major' do node = { 'platform' => 'debian', 'platform_version' => '7.1' } expect(described_class.debian_wheezy?(node)).to be true end