Sha256: 44e1a818005167643091d104f97e4b23cf8778cc8011cef3297690e12b8eb4c7

Contents?: true

Size: 1.02 KB

Versions: 99

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

property[:os] = nil
set :os, { :family => 'redhat' }

describe  get_command(:check_package_is_installed, 'telnet') do
  it { should eq 'rpm -q telnet' }
end

describe  get_command(:check_package_is_installed, 'telnet', '0.17-48.el6.x86_64') do
  it { should eq 'rpm -q telnet | grep -w -- telnet\\-0\\.17\\-48\\.el6\\.x86_64' }
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 'rpm -q linux-headers-\\$\\(uname\\ -r\\)'
  end
end

describe get_command(:install_package, 'telnet') do
  it { should eq "yum -y  install telnet" }
end

describe get_command(:install_package, 'telnet', '0.17-48.el6.x86_64') do
  it { should eq "yum -y  install telnet-0.17-48.el6.x86_64" }
end

describe get_command(:install_package, 'linux-headers-$(uname -r)') do
  it 'should be escaped (that is, command substitution should no work)' do
    should eq "yum -y  install linux-headers-\\$\\(uname\\ -r\\)"
  end
end

Version data entries

99 entries across 99 versions & 1 rubygems

Version Path
specinfra-2.91.0 spec/command/redhat/package_spec.rb
specinfra-2.90.1 spec/command/redhat/package_spec.rb
specinfra-2.90.0 spec/command/redhat/package_spec.rb
specinfra-2.89.0 spec/command/redhat/package_spec.rb
specinfra-2.88.2 spec/command/redhat/package_spec.rb
specinfra-2.88.1 spec/command/redhat/package_spec.rb
specinfra-2.88.0 spec/command/redhat/package_spec.rb
specinfra-2.87.2 spec/command/redhat/package_spec.rb
specinfra-2.87.1 spec/command/redhat/package_spec.rb
specinfra-2.87.0 spec/command/redhat/package_spec.rb
specinfra-2.86.0 spec/command/redhat/package_spec.rb
specinfra-2.85.1 spec/command/redhat/package_spec.rb
specinfra-2.85.0 spec/command/redhat/package_spec.rb
specinfra-2.84.1 spec/command/redhat/package_spec.rb
specinfra-2.84.0 spec/command/redhat/package_spec.rb
specinfra-2.83.4 spec/command/redhat/package_spec.rb
specinfra-2.83.3 spec/command/redhat/package_spec.rb
specinfra-2.83.2 spec/command/redhat/package_spec.rb
specinfra-2.83.1 spec/command/redhat/package_spec.rb
specinfra-2.83.0 spec/command/redhat/package_spec.rb