create_ini_settings_test_spec.rb 803 B

12345678910111213141516171819202122232425
  1. require 'spec_helper'
  2. # end-to-end test of the create_init_settings function
  3. describe 'create_ini_settings_test' do
  4. it { should have_ini_setting_resource_count(3) }
  5. it { should contain_ini_setting('/tmp/foo.ini [section1] setting1').with(
  6. :ensure => 'present',
  7. :section => 'section1',
  8. :setting => 'setting1',
  9. :value => 'val1',
  10. :path => '/tmp/foo.ini'
  11. )}
  12. it { should contain_ini_setting('/tmp/foo.ini [section2] setting2').with(
  13. :ensure => 'present',
  14. :section => 'section2',
  15. :setting => 'setting2',
  16. :value => 'val2',
  17. :path => '/tmp/foo.ini'
  18. )}
  19. it { should contain_ini_setting('/tmp/foo.ini [section2] setting3').with(
  20. :ensure => 'absent',
  21. :section => 'section2',
  22. :setting => 'setting3',
  23. :path => '/tmp/foo.ini'
  24. )}
  25. end