Sha256: 7bdb81352f890e620380cd3db8541a1aa0279cb31828028dda1813052d2ce59a

Contents?: true

Size: 1.37 KB

Versions: 17

Compression:

Stored size: 1.37 KB

Contents

require_relative "../../../base"

require Vagrant.source_root.join("plugins/provisioners/chef/omnibus")

describe VagrantPlugins::Chef::Omnibus do
  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

    it "includes the channel" do
      command = described_class.sh_command("chef", nil, "stable")
      expect(command).to include %|-c "stable"|
    end

    it "includes the version" do
      command = described_class.sh_command("chef", "1.2.3", "stable")
      expect(command).to include %|-v "1.2.3"|
    end

    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

  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

    it "includes the channel" do
      command = described_class.ps_command("chef", nil, "stable")
      expect(command).to include %|-channel 'stable'|
    end

    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

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
vagrant-unbundled-1.9.7.1 test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-unbundled-1.9.5.1 test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-unbundled-1.9.1.1 test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-unbundled-1.8.5.2 test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-unbundled-1.8.5.1 test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-unbundled-1.8.4.2 test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-unbundled-1.8.4.1 test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-unbundled-1.8.1.2 test/unit/plugins/provisioners/chef/omnibus_test.rb
vagrant-unbundled-1.8.1.1 test/unit/plugins/provisioners/chef/omnibus_test.rb