vagrant/test/unit/plugins/provisioners/chef/omnibus_test.rb

47 lines
1.4 KiB
Ruby
Raw Normal View History

require_relative "../../../base"
require Vagrant.source_root.join("plugins/provisioners/chef/omnibus")
2015-01-07 20:51:55 +00:00
describe VagrantPlugins::Chef::Omnibus do
2015-11-19 23:01:09 +00:00
describe "#sh_command" do
it "includes the project name" do
command = described_class.sh_command("chef", nil, "stable")
expect(command).to include %|-P "chef"|
end
2015-11-19 23:01:09 +00:00
it "includes the channel" do
command = described_class.sh_command("chef", nil, "stable")
expect(command).to include %|-c "stable"|
end
2015-11-19 23:01:09 +00:00
it "includes the version" do
command = described_class.sh_command("chef", "1.2.3", "stable")
expect(command).to include %|-v "1.2.3"|
end
2015-11-19 23:01:09 +00:00
it "includes the download path" do
command = described_class.sh_command("chef", "1.2.3", "stable",
download_path: "/some/path",
)
expect(command).to include %|-d "/some/path"|
end
end
2015-11-19 23:01:09 +00:00
describe "#ps_command" do
it "includes the project name" do
command = described_class.ps_command("chef", nil, "stable")
expect(command).to include %|-project 'chef'|
end
2015-11-19 23:01:09 +00:00
it "includes the channel" do
command = described_class.ps_command("chef", nil, "stable")
expect(command).to include %|-channel 'stable'|
end
2015-11-19 23:01:09 +00:00
it "includes the version" do
command = described_class.ps_command("chef", "1.2.3", "stable")
expect(command).to include %|-version '1.2.3'|
end
end
end