a87f908411f5296adc6b9ecbdaab6aeff68f99da
[puppet-modules/puppetlabs-apt.git] / spec / system / basic_spec.rb
1 require 'spec_helper_system'
2
3 describe 'basic tests:' do
4   # Using puppet_apply as a subject
5   context puppet_apply 'notice("foo")' do
6     its(:stdout) { should =~ /foo/ }
7     its(:stderr) { should be_empty }
8     its(:exit_code) { should be_zero }
9   end
10 end
11
12 describe 'disable selinux:' do
13   context puppet_apply '
14   exec { "setenforce 0":
15     path   => "/bin:/sbin:/usr/bin:/usr/sbin",
16     onlyif => "which setenforce && getenforce | grep Enforcing",
17   }
18   ' do
19     its(:stderr) { should be_empty }
20     its(:exit_code) { should_not == 1 }
21   end
22 end