chef-lctp/spec/coobooks/dhcp_spec.rb

19 lines
462 B
Ruby
Raw Normal View History

2014-01-19 14:34:01 +00:00
require_relative '../spec_helper'
describe 'dhcp::default' do
let(:chef_run) do
ChefSpec::Runner.new do |node|
node.set["dhcp"]["hosts"] =[{
name: "node0",
2014-01-21 22:11:25 +00:00
mac: "5c:a1:ab:1e:00:01",
2014-01-19 14:34:01 +00:00
ip: "172.28.128.101"
}]
end.converge(described_recipe)
end
it "should setup dhcp" do
2014-01-21 22:11:25 +00:00
chef_run.should render_file("/etc/dhcp/dhcpd.conf").with_content("node0")
2014-01-19 14:34:01 +00:00
chef_run.should install_package("isc-dhcp-server")
end
end