summaryrefslogtreecommitdiff
path: root/spec/functional/resource/windows_package_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functional/resource/windows_package_spec.rb')
-rw-r--r--spec/functional/resource/windows_package_spec.rb42
1 files changed, 21 insertions, 21 deletions
diff --git a/spec/functional/resource/windows_package_spec.rb b/spec/functional/resource/windows_package_spec.rb
index 957f357846..684f2542c2 100644
--- a/spec/functional/resource/windows_package_spec.rb
+++ b/spec/functional/resource/windows_package_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'functional/resource/base'
+require "spec_helper"
+require "functional/resource/base"
describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
let(:pkg_name) { nil }
@@ -38,9 +38,9 @@ describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
end
describe "install package" do
- let(:pkg_name) { 'Microsoft Visual C++ 2005 Redistributable' }
- let(:pkg_checksum) { 'd6832398e3bc9156a660745f427dc1c2392ce4e9a872e04f41f62d0c6bae07a8' }
- let(:pkg_path) { 'https://download.microsoft.com/download/6/B/B/6BB661D6-A8AE-4819-B79F-236472F6070C/vcredist_x86.exe' }
+ let(:pkg_name) { "Microsoft Visual C++ 2005 Redistributable" }
+ let(:pkg_checksum) { "d6832398e3bc9156a660745f427dc1c2392ce4e9a872e04f41f62d0c6bae07a8" }
+ let(:pkg_path) { "https://download.microsoft.com/download/6/B/B/6BB661D6-A8AE-4819-B79F-236472F6070C/vcredist_x86.exe" }
let(:pkg_checksum) { nil }
let(:pkg_type) { :custom }
let(:pkg_options) { "/Q" }
@@ -56,9 +56,9 @@ describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
end
context "installing additional version" do
- let(:pkg_path) { 'https://download.microsoft.com/download/e/1/c/e1c773de-73ba-494a-a5ba-f24906ecf088/vcredist_x86.exe' }
- let(:pkg_checksum) { 'eb00f891919d4f894ab725b158459db8834470c382dc60cd3c3ee2c6de6da92c' }
- let(:pkg_version) { '8.0.56336' }
+ let(:pkg_path) { "https://download.microsoft.com/download/e/1/c/e1c773de-73ba-494a-a5ba-f24906ecf088/vcredist_x86.exe" }
+ let(:pkg_checksum) { "eb00f891919d4f894ab725b158459db8834470c382dc60cd3c3ee2c6de6da92c" }
+ let(:pkg_version) { "8.0.56336" }
it "installs older version" do
subject.run_action(:install)
@@ -70,14 +70,14 @@ describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
subject { Chef::Resource::WindowsPackage.new(pkg_name, run_context) }
context "multiple versions and a version given to remove" do
- before { subject.version('8.0.56336')}
+ before { subject.version("8.0.56336")}
it "removes specified version" do
subject.run_action(:remove)
expect(subject).to be_updated_by_last_action
prov = subject.provider_for_action(:remove)
prov.load_current_resource
- expect(prov.current_version_array).to eq([['8.0.59193']])
+ expect(prov.current_version_array).to eq([["8.0.59193"]])
end
end
@@ -102,8 +102,8 @@ describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
install1.run_action(:install)
install2 = Chef::Resource::WindowsPackage.new(pkg_name, run_context)
- install2.source 'https://download.microsoft.com/download/e/1/c/e1c773de-73ba-494a-a5ba-f24906ecf088/vcredist_x86.exe'
- install2.version '8.0.56336'
+ install2.source "https://download.microsoft.com/download/e/1/c/e1c773de-73ba-494a-a5ba-f24906ecf088/vcredist_x86.exe"
+ install2.version "8.0.56336"
install2.installer_type pkg_type
install2.options pkg_options
install2.run_action(:install)
@@ -124,9 +124,9 @@ describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
after { subject.run_action(:remove) }
context "null soft" do
- let(:pkg_name) { 'Ultra Defragmenter' }
- let(:pkg_path) { 'http://iweb.dl.sourceforge.net/project/ultradefrag/stable-release/6.1.1/ultradefrag-6.1.1.bin.amd64.exe' }
- let(:pkg_checksum) { '11d53ed4c426c8c867ad43f142b7904226ffd9938c02e37086913620d79e3c09' }
+ let(:pkg_name) { "Ultra Defragmenter" }
+ let(:pkg_path) { "http://iweb.dl.sourceforge.net/project/ultradefrag/stable-release/6.1.1/ultradefrag-6.1.1.bin.amd64.exe" }
+ let(:pkg_checksum) { "11d53ed4c426c8c867ad43f142b7904226ffd9938c02e37086913620d79e3c09" }
it "finds the correct installer type" do
subject.run_action(:install)
@@ -135,9 +135,9 @@ describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
end
context "inno" do
- let(:pkg_name) { 'Mercurial 3.6.1 (64-bit)' }
- let(:pkg_path) { 'http://mercurial.selenic.com/release/windows/Mercurial-3.6.1-x64.exe' }
- let(:pkg_checksum) { 'febd29578cb6736163d232708b834a2ddd119aa40abc536b2c313fc5e1b5831d' }
+ let(:pkg_name) { "Mercurial 3.6.1 (64-bit)" }
+ let(:pkg_path) { "http://mercurial.selenic.com/release/windows/Mercurial-3.6.1-x64.exe" }
+ let(:pkg_checksum) { "febd29578cb6736163d232708b834a2ddd119aa40abc536b2c313fc5e1b5831d" }
it "finds the correct installer type" do
subject.run_action(:install)
@@ -147,9 +147,9 @@ describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
end
describe "install from local file" do
- let(:pkg_name) { 'Mercurial 3.6.1 (64-bit)' }
+ let(:pkg_name) { "Mercurial 3.6.1 (64-bit)" }
let(:pkg_path) { ::File.join(Chef::Config[:file_cache_path], "package", "Mercurial-3.6.1-x64.exe") }
- let(:pkg_checksum) { 'febd29578cb6736163d232708b834a2ddd119aa40abc536b2c313fc5e1b5831d' }
+ let(:pkg_checksum) { "febd29578cb6736163d232708b834a2ddd119aa40abc536b2c313fc5e1b5831d" }
it "installs the app" do
subject.run_action(:install)
@@ -158,7 +158,7 @@ describe Chef::Resource::WindowsPackage, :windows_only, :volatile do
end
describe "uninstall exe without source" do
- let(:pkg_name) { 'Mercurial 3.6.1 (64-bit)' }
+ let(:pkg_name) { "Mercurial 3.6.1 (64-bit)" }
it "uninstalls the app" do
subject.run_action(:remove)