Skip to content

Instantly share code, notes, and snippets.

@nandotorres
Created December 14, 2016 01:01
Show Gist options
  • Save nandotorres/d2d5173a3c0d0d71e34d268107c94c27 to your computer and use it in GitHub Desktop.
Save nandotorres/d2d5173a3c0d0d71e34d268107c94c27 to your computer and use it in GitHub Desktop.
Configure ChefSolo and specify platform on default_spec.rb
require 'spec_helper'
describe 'cookbook::default' do
context 'When applying cookbooks on an Ubuntu instance' do
let(:chef_run) do
runner = ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '16.04')
runner.converge(described_recipe)
end
it 'converges successfully' do
expect { chef_run }.to_not raise_error
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment