summaryrefslogtreecommitdiff
path: root/spec/acceptance/ensure_packages_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/acceptance/ensure_packages_spec.rb')
-rwxr-xr-xspec/acceptance/ensure_packages_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/acceptance/ensure_packages_spec.rb b/spec/acceptance/ensure_packages_spec.rb
new file mode 100755
index 0000000..145bdc5
--- /dev/null
+++ b/spec/acceptance/ensure_packages_spec.rb
@@ -0,0 +1,24 @@
+#! /usr/bin/env ruby -S rspec
+require 'spec_helper_acceptance'
+
+describe 'ensure_packages function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do
+ describe 'success' do
+ it 'ensure_packages a package' do
+ apply_manifest('package { "zsh": ensure => absent, }')
+ pp = <<-EOS
+ $a = "zsh"
+ ensure_packages($a)
+ EOS
+
+ apply_manifest(pp, :expect_changes => true) do |r|
+ expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/)
+ end
+ 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