Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save johnfitzpatrick/0d105aa2e19460593743 to your computer and use it in GitHub Desktop.
Save johnfitzpatrick/0d105aa2e19460593743 to your computer and use it in GitHub Desktop.
cookbooks_mailx_spec_unit_default_spec.rb
require 'spec_helper'
describe 'mailx::default' do
context 'on Debian' do
let(:chef_run) { ChefSpec::Runner.new({:platform => 'ubuntu', :version => '14.04'}).converge(described_recipe) }
it 'should install the correct packages' do
expect(chef_run).to install_package 'mailutils'
end
end
context 'on CentOS' do
let(:chef_run) { ChefSpec::Runner.new({:platform => 'centos', :version => '6.5'}).converge(described_recipe) }
it 'should install the correct packages' do
expect(chef_run).to install_package 'mailx'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment