Sha256: 4ccb06f2a5457d79eb530094021105e54f8c01e930df107dc43a66a1eec500ef

Contents?: true

Size: 1.5 KB

Versions: 99

Compression:

Stored size: 1.5 KB

Contents

require 'spec_helper'

property[:os] = nil
set :os, :family => 'debian'

describe get_command(:check_package_is_installed, 'telnet') do
  it { should eq "dpkg-query -f '${Status}' -W telnet | grep -E '^(install|hold) ok installed$'" }
end

describe get_command(:check_package_is_installed, 'telnet', '0.17-36build2') do
  it { should eq "dpkg-query -f '${Status} ${Version}' -W telnet | grep -E '^(install|hold) ok installed 0\\.17\\-36build2$'" }
end

describe get_command(:check_package_is_installed, 'linux-headers-$(uname -r)') do
  it 'should be escaped (that is, command substitution should not work)' do
    should eq "dpkg-query -f '${Status}' -W linux-headers-\\$\\(uname\\ -r\\) | grep -E '^(install|hold) ok installed$'"
  end
end

describe get_command(:install_package, 'telnet') do
  it { should eq "DEBIAN_FRONTEND='noninteractive' apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'  install telnet" }
end

describe get_command(:install_package, 'telnet', '0.17-36build2') do
  it { should eq "DEBIAN_FRONTEND='noninteractive' apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'  install telnet\\=0.17-36build2" }
end

describe get_command(:install_package, 'linux-headers-$(uname -r)') do
  it 'should be escaped (that is, command substitution should not work)' do
    should eq "DEBIAN_FRONTEND='noninteractive' apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'  install linux-headers-\\$\\(uname\\ -r\\)"
  end
end

Version data entries

99 entries across 99 versions & 1 rubygems

Version Path
specinfra-2.70.2 spec/command/debian/package_spec.rb
specinfra-2.70.1 spec/command/debian/package_spec.rb
specinfra-2.70.0 spec/command/debian/package_spec.rb
specinfra-2.69.0 spec/command/debian/package_spec.rb
specinfra-2.68.2 spec/command/debian/package_spec.rb
specinfra-2.68.1 spec/command/debian/package_spec.rb
specinfra-2.68.0 spec/command/debian/package_spec.rb
specinfra-2.67.10 spec/command/debian/package_spec.rb
specinfra-2.67.9 spec/command/debian/package_spec.rb
specinfra-2.67.8 spec/command/debian/package_spec.rb
specinfra-2.67.7 spec/command/debian/package_spec.rb
specinfra-2.67.6 spec/command/debian/package_spec.rb
specinfra-2.67.5 spec/command/debian/package_spec.rb
specinfra-2.67.3 spec/command/debian/package_spec.rb
specinfra-2.67.2 spec/command/debian/package_spec.rb
specinfra-2.67.1 spec/command/debian/package_spec.rb
specinfra-2.67.0 spec/command/debian/package_spec.rb
specinfra-2.66.9 spec/command/debian/package_spec.rb
specinfra-2.66.8 spec/command/debian/package_spec.rb