]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/apache/spec/acceptance/service_spec.rb
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / apache / spec / acceptance / service_spec.rb
diff --git a/3rdparty/modules/apache/spec/acceptance/service_spec.rb b/3rdparty/modules/apache/spec/acceptance/service_spec.rb
new file mode 100644 (file)
index 0000000..b51ca38
--- /dev/null
@@ -0,0 +1,19 @@
+require 'spec_helper_acceptance'
+
+describe 'apache::service class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
+  describe 'adding dependencies in between the base class and service class' do
+    it 'should work with no errors' do
+      pp = <<-EOS
+      class { 'apache': }
+      file { '/tmp/test':
+        require => Class['apache'],
+        notify  => Class['apache::service'],
+      }
+      EOS
+
+      # Run it twice and test for idempotency
+      apply_manifest(pp, :catch_failures => true)
+      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
+    end
+  end
+end