example_spec.rb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. require 'spec_helper'
  2. # describe 'oracle' do
  3. # context 'supported operating systems' do
  4. # ['Debian', 'RedHat'].each do |osfamily|
  5. # describe "oracle class without any parameters on #{osfamily}" do
  6. # let(:params) {{ }}
  7. # let(:facts) {{
  8. # :osfamily => osfamily,
  9. # }}
  10. # it { should compile.with_all_deps }
  11. # it { should contain_class('oracle::params') }
  12. # it { should contain_class('oracle::install').that_comes_before('oracle::config') }
  13. # it { should contain_class('oracle::config') }
  14. # it { should contain_class('oracle::service').that_subscribes_to('oracle::config') }
  15. # it { should contain_service('oracle') }
  16. # it { should contain_package('oracle').with_ensure('present') }
  17. # end
  18. # end
  19. # end
  20. # context 'unsupported operating system' do
  21. # describe 'oracle class without any parameters on Solaris/Nexenta' do
  22. # let(:facts) {{
  23. # :osfamily => 'Solaris',
  24. # :operatingsystem => 'Nexenta',
  25. # }}
  26. # it { expect { should contain_package('oracle') }.to raise_error(Puppet::Error, /Nexenta not supported/) }
  27. # end
  28. # end
  29. # end