Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe 'css-baseline::default' do
  4. context 'When all attributes are default, on a supported platform_family' do
  5. let(:chef_run) do
  6. runner = ChefSpec::SoloRunner.new
  7. runner.node.set['platform_family'] = 'rhel'
  8. runner.converge(described_recipe)
  9. end
  10.  
  11. it 'includes resolver' do
  12. expect_any_instance_of(Chef::Recipe).to receive(:include_recipe).with('resolver::default')
  13. chef_run
  14. end
  15. end
  16.  
  17. context 'On an unsupported platform_family' do
  18. let(:chef_run) do
  19. runner = ChefSpec::SoloRunner.new
  20. runner.node.set['platform_family'] = 'windows'
  21. runner.converge(described_recipe)
  22. end
  23.  
  24. it 'raises an error' do
  25. expect {
  26. chef_run
  27. }.to raise_error
  28. end
  29. end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement