chef-lctp/spec/coobooks/main_spec.rb

31 lines
782 B
Ruby
Raw Normal View History

2014-01-21 22:11:25 +00:00
require_relative '../spec_helper'
describe 'main::head_node' do
let(:chef_run) do
ChefSpec::Runner.new do |node|
node.set["main"] = {
head_node: {
internal_ip: "10.10.1.1",
internal_network_device: "10.10.1.1"
}
}
end.converge(described_recipe)
end
it "should include cookbooks" do
expect(chef_run).should include_recipe('ntp')
expect(chef_run).should include_recipe('bind')
expect(chef_run).should include_recipe('dhcp')
end
end
describe 'main::compute_node' do
let(:chef_run) do
ChefSpec::Runner.new do |node|
end.converge(described_recipe)
end
it "should include cookbooks" do
expect(chef_run).should include_recipe('apt')
expect(chef_run).should include_recipe('ntp')
end
end