require_relative '../spec_helper' describe 'dhcp::default' do let(:chef_run) do ChefSpec::Runner.new do |node| node.set["dhcp"]["hosts"] =[{ name: "node0", mac: "5CA1AB1E0001", ip: "172.28.128.101" }] end.converge(described_recipe) end it "should setup dhcp" do chef_run.should render_file("/etc/dhcpcd.conf").with_content("node0") chef_run.should install_package("isc-dhcp-server") end end