Merge pull request #321 from raoulbhatia/squeeze-lts
[puppet-modules/puppetlabs-apt.git] / spec / classes / params_spec.rb
index f2790b0adb25615cd525d64d6ee9ffd3f11135ff..aa330bb987649ac03eeefc237164b09ad276d3ef 100644 (file)
@@ -1,5 +1,6 @@
 require 'spec_helper'
 describe 'apt::params', :type => :class do
+  let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian' } }
   let (:title) { 'my_package' }
 
   it { should contain_apt__params }
@@ -10,4 +11,17 @@ describe 'apt::params', :type => :class do
   it "Should not contain any resources" do
     subject.resources.size.should == 4
   end
+
+  describe "With unknown lsbdistid" do
+
+    let(:facts) { { :lsbdistid => 'CentOS' } }
+    let (:title) { 'my_package' }
+
+    it do
+      expect {
+       should compile
+      }.to raise_error(Puppet::Error, /Unsupported lsbdistid/)
+    end
+
+  end
 end