spec/unit/chef/sugar/platform_spec.rb in chef-sugar-2.0.0 vs spec/unit/chef/sugar/platform_spec.rb in chef-sugar-2.1.0
- old
+ new
@@ -85,9 +85,33 @@
node = { 'platform' => 'windows' }
expect(described_class.redhat_enterprise_linux?(node)).to be_falsey
end
end
+ describe '#solaris2?' do
+ it 'returns true when the platform is solaris2' do
+ node = { 'platform' => 'solaris2' }
+ expect(described_class.solaris2?(node)).to be_truthy
+ end
+
+ it 'returns false when the platform is not solaris2' do
+ node = { 'platform' => 'windows' }
+ expect(described_class.solaris2?(node)).to be_falsey
+ end
+ end
+
+ describe '#aix?' do
+ it 'returns true when the platform is aix' do
+ node = { 'platform' => 'aix' }
+ expect(described_class.aix?(node)).to be_truthy
+ end
+
+ it 'returns false when the platform is not aix' do
+ node = { 'platform' => 'windows' }
+ expect(described_class.aix?(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