From: Matthaus Litteken Date: Fri, 24 Feb 2012 05:40:42 +0000 (-0800) Subject: Add test for python-software-properties package X-Git-Tag: 0.0.1~5^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8acb20268575002cd2b6e7d41eef71db7dd88452;p=puppet-modules%2Fpuppetlabs-apt.git Add test for python-software-properties package This test adds the precondition that the python-software-packages package be installed before the apt class is synced. If the defined function were not called around the package resource, this test would fail with a duplicate package resource error. --- diff --git a/spec/classes/apt_spec.rb b/spec/classes/apt_spec.rb index e21c78e..812fa12 100644 --- a/spec/classes/apt_spec.rb +++ b/spec/classes/apt_spec.rb @@ -124,4 +124,9 @@ describe 'apt', :type => :class do end end end + + describe "it should not error if package['python-software-properties'] is already defined" do + let(:pre_condition) { 'package { "python-software-properties": }->Class["Apt"]' } + it { should contain_package("python-software-properties") } + end end