Browse Source

Merge pull request #141 from petems/dry_up_spec_test

Replace code with pre-existing shared_example
Morgan Haskel 9 years ago
parent
commit
be5fc47f00
1 changed files with 1 additions and 7 deletions
  1. 1 7
      spec/acceptance/ini_setting_spec.rb

+ 1 - 7
spec/acceptance/ini_setting_spec.rb

@@ -72,13 +72,7 @@ describe 'ini_setting resource' do
         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