Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spec_helper'
- describe 'css-baseline::default' do
- context 'When all attributes are default, on a supported platform_family' do
- let(:chef_run) do
- runner = ChefSpec::SoloRunner.new
- runner.node.set['platform_family'] = 'rhel'
- runner.converge(described_recipe)
- end
- it 'includes resolver' do
- expect_any_instance_of(Chef::Recipe).to receive(:include_recipe).with('resolver::default')
- chef_run
- end
- end
- context 'On an unsupported platform_family' do
- let(:chef_run) do
- runner = ChefSpec::SoloRunner.new
- runner.node.set['platform_family'] = 'windows'
- runner.converge(described_recipe)
- end
- it 'raises an error' do
- expect {
- chef_run
- }.to raise_error
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement