spec/support/shared_matcher_examples.rb in serverspec-0.2.13 vs spec/support/shared_matcher_examples.rb in serverspec-0.2.14
- old
+ new
@@ -224,10 +224,28 @@
it { should_not be_grouped_into 'invalid-group' }
end
end
end
+shared_examples_for 'support be_enforcing matcher' do |selinux|
+ describe selinux do
+ it { should be_enforcing }
+ end
+end
+
+shared_examples_for 'support be_permissive matcher' do |selinux|
+ describe selinux do
+ it { should be_permissive }
+ end
+end
+
+shared_examples_for 'support be_disabled matcher' do |selinux|
+ describe selinux do
+ it { should be_disabled }
+ end
+end
+
shared_examples_for 'support have_cron_entry matcher' do |title, entry|
describe 'have_cron_entry' do
describe title do
it { should have_cron_entry entry }
end
@@ -323,25 +341,9 @@
end
describe 'iptables' do
it { should_not have_iptables_rule('invalid-rule').with_table(table).with_chain(chain) }
end
- end
-end
-
-shared_examples_for 'support get_stdout matcher' do |command, output|
- before :all do
- RSpec.configure do |c|
- c.stdout = "#{output}\r\n"
- end
- end
-
- describe command do
- it { should get_stdout output }
- end
-
- describe command do
- it { should_not get_stdout 'invalid-output' }
end
end
shared_examples_for 'support be_zfs matcher' do |zfs|
describe 'be_zfs' do