Merge pull request #657 from puppetlabs/binford2k-patch-1
[puppet-modules/puppetlabs-apt.git] / spec / defines / pin_spec.rb
index 550d89e4816b67cee6fe586b5c1a7c490448c355..50890fcf6b8be39d4fa8991dbe8285be2e2bd561 100644 (file)
@@ -3,7 +3,13 @@ describe 'apt::pin', :type => :define do
   let :pre_condition do
     'class { "apt": }'
   end
-  let(:facts) { { :lsbdistid => 'Debian', :osfamily => 'Debian', :lsbdistcodename => 'wheezy', :puppetversion   => Puppet.version, } }
+  let(:facts) { {
+    :os => { :family => 'Debian', :name => 'Debian', :release => { :major => '7', :full => '7.0' }},
+    :lsbdistid       => 'Debian',
+    :osfamily        => 'Debian',
+    :lsbdistcodename => 'wheezy',
+    :puppetversion   => Puppet.version,
+  } }
   let(:title) { 'my_pin' }
 
   context 'defaults' do
@@ -78,7 +84,7 @@ describe 'apt::pin', :type => :define do
       it do
         expect {
           subject.call
-        }.to raise_error(Puppet::Error, /expects a value of type Integer/)
+        }.to raise_error(Puppet::Error, /expects an Integer value, got String/)
       end
     end