spec/unit/chef/sugar/platform_spec.rb in chef-sugar-3.2.0 vs spec/unit/chef/sugar/platform_spec.rb in chef-sugar-3.3.0
- old
+ new
@@ -169,9 +169,16 @@
node = { 'platform' => 'windows' }
expect(described_class.ios_xr?(node)).to be false
end
end
+ describe '#platform_version' do
+ it 'returns the platform version' do
+ node = { 'platform_version' => '1.2.3' }
+ expect(described_class.platform_version(node)).to eq('1.2.3')
+ 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 true