From 9280f81be56c4f09f02ce1fdeca5c7c9755353f5 Mon Sep 17 00:00:00 2001 From: Peter Souter Date: Sun, 11 Jan 2015 19:45:27 -0800 Subject: [PATCH] Replace code with pre-existing shared_example Noticed this when I was testing the module out with a FreeBSD host this code duplicates the shared_example used in the rest of the spec, so I DRY'd it up! :+1: --- spec/acceptance/ini_setting_spec.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spec/acceptance/ini_setting_spec.rb b/spec/acceptance/ini_setting_spec.rb index b47fdfcad..4fb7379cb 100644 --- a/spec/acceptance/ini_setting_spec.rb +++ b/spec/acceptance/ini_setting_spec.rb @@ -72,13 +72,7 @@ apply_manifest(pp, :catch_changes => true) end - describe file("#{tmpdir}/ini_setting.ini") do - it { should be_file } - #XXX Solaris 10 doesn't support multi-line grep - it("should contain four = five\n[one]\ntwo = three", :unless => fact('osfamily') == 'Solaris') { - should contain("four = five\n[one]\ntwo = three") - } - end + it_behaves_like 'has_content', "#{tmpdir}/ini_setting.ini", pp, "four = five\n[one]\ntwo = three" end context '=> absent for key/value' do