require_relative '../spec_helper' describe 'ntp::default' do let(:chef_run) do ChefSpec::Runner.new do |node| node.set["ntp"]["subnets"] = ["::1", "127.0.0.1", "172.28.128.0 mask 255.255.255.0 nomodify notrap nopeer"] end.converge(described_recipe) end it "should setup ntp" do chef_run.should install_package("ntp") chef_run.should render_file("/etc/ntp.conf").with_content("172.28.128.0") end end