summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package/dpkg_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/provider/package/dpkg_spec.rb')
-rw-r--r--spec/unit/provider/package/dpkg_spec.rb42
1 files changed, 21 insertions, 21 deletions
diff --git a/spec/unit/provider/package/dpkg_spec.rb b/spec/unit/provider/package/dpkg_spec.rb
index cf8f5097f0..9df19f0f1b 100644
--- a/spec/unit/provider/package/dpkg_spec.rb
+++ b/spec/unit/provider/package/dpkg_spec.rb
@@ -34,18 +34,18 @@ describe Chef::Provider::Package::Dpkg do
let(:dpkg_deb_status) { status = double(stdout: "#{package}\t#{dpkg_deb_version}", exitstatus: 0) }
let(:dpkg_s_version) { "1.11.4-1ubuntu1" }
let(:dpkg_s_status) do
- stdout = <<-DPKG_S
-Package: #{package}
-Status: install ok installed
-Priority: important
-Section: web
-Installed-Size: 1944
-Maintainer: Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
-Architecture: amd64
-Version: #{dpkg_s_version}
-Config-Version: #{dpkg_s_version}
-Depends: libc6 (>= 2.8~20080505), libssl0.9.8 (>= 0.9.8f-5)
-Conflicts: wget-ssl
+ stdout = <<~DPKG_S
+ Package: #{package}
+ Status: install ok installed
+ Priority: important
+ Section: web
+ Installed-Size: 1944
+ Maintainer: Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
+ Architecture: amd64
+ Version: #{dpkg_s_version}
+ Config-Version: #{dpkg_s_version}
+ Depends: libc6 (>= 2.8~20080505), libssl0.9.8 (>= 0.9.8f-5)
+ Conflicts: wget-ssl
DPKG_S
status = double(stdout: stdout, exitstatus: 1)
end
@@ -172,10 +172,10 @@ Conflicts: wget-ssl
it "on new debian/ubuntu we get an exit(1) and no stdout from dpkg -s for uninstalled" do
dpkg_s_status = double(
- exitstatus: 1, stdout: "", stderr: <<-EOF
-dpkg-query: package '#{package}' is not installed and no information is available
-Use dpkg --info (= dpkg-deb --info) to examine archive files,
-and dpkg --contents (= dpkg-deb --contents) to list their contents.
+ exitstatus: 1, stdout: "", stderr: <<~EOF
+ dpkg-query: package '#{package}' is not installed and no information is available
+ Use dpkg --info (= dpkg-deb --info) to examine archive files,
+ and dpkg --contents (= dpkg-deb --contents) to list their contents.
EOF
)
expect(provider).to receive(:shell_out_compacted!).with("dpkg", "-s", package, returns: [0, 1], timeout: 900).and_return(dpkg_s_status)
@@ -185,11 +185,11 @@ and dpkg --contents (= dpkg-deb --contents) to list their contents.
it "on old debian/ubuntu we get an exit(0) and we get info on stdout from dpkg -s for uninstalled" do
dpkg_s_status = double(
- exitstatus: 0, stderr: "", stdout: <<-EOF
-Package: #{package}
-Status: unknown ok not-installed
-Priority: extra
-Section: ruby
+ exitstatus: 0, stderr: "", stdout: <<~EOF
+ Package: #{package}
+ Status: unknown ok not-installed
+ Priority: extra
+ Section: ruby
EOF
)
expect(provider).to receive(:shell_out_compacted!).with("dpkg", "-s", package, returns: [0, 1], timeout: 900).and_return(dpkg_s_status)