2014-05-07 03:48:59 +02:00
|
|
|
#! /usr/bin/env ruby -S rspec
|
|
|
|
require 'spec_helper_acceptance'
|
|
|
|
|
2014-11-12 00:33:43 +01:00
|
|
|
describe 'ensure_packages function', :unless => fact('osfamily') =~ /windows/i do
|
2014-05-07 03:48:59 +02:00
|
|
|
describe 'success' do
|
|
|
|
it 'ensure_packages a package' do
|
2014-06-20 19:41:43 +02:00
|
|
|
apply_manifest('package { "rake": ensure => absent, provider => "gem", }')
|
2014-05-07 03:48:59 +02:00
|
|
|
pp = <<-EOS
|
2014-06-20 00:38:23 +02:00
|
|
|
$a = "rake"
|
|
|
|
ensure_packages($a,{'provider' => 'gem'})
|
2014-05-07 03:48:59 +02:00
|
|
|
EOS
|
|
|
|
|
2014-06-20 19:41:43 +02:00
|
|
|
apply_manifest(pp, :expect_changes => true)
|
2014-05-07 03:48:59 +02:00
|
|
|
end
|
|
|
|
it 'ensures a package already declared'
|
|
|
|
it 'takes defaults arguments'
|
|
|
|
end
|
|
|
|
describe 'failure' do
|
|
|
|
it 'handles no arguments'
|
|
|
|
it 'handles non strings'
|
|
|
|
end
|
|
|
|
end
|