class_spec.rb 548 B

123456789101112131415161718192021222324
  1. require 'spec_helper_acceptance'
  2. describe "nginx class:" do
  3. context 'default parameters' do
  4. it 'should run successfully' do
  5. pp = "class { 'nginx': }"
  6. # Run it twice and test for idempotency
  7. apply_manifest(pp, :catch_failures => true)
  8. expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
  9. end
  10. end
  11. describe package('nginx') do
  12. it { is_expected.to be_installed }
  13. end
  14. describe service('nginx') do
  15. it { is_expected.to be_running }
  16. it { is_expected.to be_enabled }
  17. end
  18. end