Browse Source

Correct errors introduced by using latest apt module

Since librarian-puppet had locked to old versions of Forge modules
but puppetlabs_spec_helper is now pulling the latest version,
there's this incompatibility to take care of in the test suite.
Matthew Haughton 10 years ago
parent
commit
5aa2f66ca3
2 changed files with 10 additions and 4 deletions
  1. 1 0
      spec/classes/nginx_spec.rb
  2. 9 4
      spec/classes/package_spec.rb

+ 1 - 0
spec/classes/nginx_spec.rb

@@ -34,6 +34,7 @@ describe 'nginx' do
           :operatingsystem => 'Debian',
           :osfamily        => 'Debian',
           :lsbdistcodename => 'precise',
+          :lsbdistid       => 'Debian',
         }
       end
     end

+ 9 - 4
spec/classes/package_spec.rb

@@ -48,8 +48,13 @@ describe 'nginx::package' do
     end
   end
 
-  shared_examples 'debian' do |operatingsystem, lsbdistcodename|
-    let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'Debian', :lsbdistcodename => lsbdistcodename }}
+  shared_examples 'debian' do |operatingsystem, lsbdistcodename, lsbdistid|
+    let(:facts) {{
+      :operatingsystem => operatingsystem,
+      :osfamily        => 'Debian',
+      :lsbdistcodename => lsbdistcodename,
+      :lsbdistid       => lsbdistid
+    }}
 
     context "using defaults" do
       it { should contain_package('nginx') }
@@ -105,8 +110,8 @@ describe 'nginx::package' do
   end
 
   context 'debian' do
-    it_behaves_like 'debian', 'debian', 'wheezy'
-    it_behaves_like 'debian', 'ubuntu', 'precise'
+    it_behaves_like 'debian', 'debian', 'wheezy', 'debian'
+    it_behaves_like 'debian', 'ubuntu', 'precise', 'ubuntu'
   end
 
   context 'suse' do