spec/unit/chef/sugar/platform_spec.rb in chef-sugar-2.1.0 vs spec/unit/chef/sugar/platform_spec.rb in chef-sugar-2.2.0

- old
+ new

@@ -109,9 +109,33 @@ node = { 'platform' => 'windows' } expect(described_class.aix?(node)).to be_falsey end end + describe '#smartos?' do + it 'returns true when the platform is smartos' do + node = { 'platform' => 'smartos' } + expect(described_class.smartos?(node)).to be_truthy + end + + it 'returns false when the platform is not smartos' do + node = { 'platform' => 'windows' } + expect(described_class.smartos?(node)).to be_falsey + end + end + + describe '#omnios?' do + it 'returns true when the platform is omnios' do + node = { 'platform' => 'omnios' } + expect(described_class.omnios?(node)).to be_truthy + end + + it 'returns false when the platform is not omnios' do + node = { 'platform' => 'windows' } + expect(described_class.omnios?(node)).to be_falsey + end + end + context 'dynamic matchers' do describe '#ubuntu_after_lucid?' do it 'returns true when the version is later than 10.04' do node = { 'platform' => 'ubuntu', 'platform_version' => '10.10' } expect(described_class.ubuntu_after_lucid?(node)).to be_truthy