spec/unit/chef/sugar/platform_family_spec.rb in chef-sugar-3.1.1 vs spec/unit/chef/sugar/platform_family_spec.rb in chef-sugar-3.2.0

- old
+ new

@@ -133,17 +133,34 @@ node = { 'platform_family' => 'debian' } expect(described_class.windows?(node)).to be false end end + describe '#wrlinux?' do + it 'returns true when the platform_family is wrlinux' do + node = { 'platform_family' => 'wrlinux' } + expect(described_class.wrlinux?(node)).to be true + end + + it 'returns false when the platform_family is not wrlinux' do + node = { 'platform_family' => 'debian' } + expect(described_class.wrlinux?(node)).to be false + end + end + describe '#linux?' do it 'returns true when the platform_family is Debian' do node = { 'platform_family' => 'debian' } expect(described_class.linux?(node)).to be true end it 'returns true when the platform_family is RedHat' do node = { 'platform_family' => 'rhel' } + expect(described_class.linux?(node)).to be true + end + + it 'returns true when the platform_family is wrlinux' do + node = { 'platform_family' => 'wrlinux' } expect(described_class.linux?(node)).to be true end it 'returns false when the platform_family is Windows' do node = { 'platform_family' => 'windows' }