Merge pull request #657 from puppetlabs/binford2k-patch-1
[puppet-modules/puppetlabs-apt.git] / spec / defines / key_spec.rb
index a7334d8115e2973b936940c2c908a9cd275ceb1e..334924d2b7ce1fdcbf468dc2d1d30f18ae386881 100644 (file)
@@ -5,7 +5,13 @@ describe 'apt::key' 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,
+  } }
 
   GPG_KEY_ID = '6F6B15509CF8E59E6E469F327F438280EF8D349F'
 
@@ -245,7 +251,7 @@ describe 'apt::key' do
         :content => [],
       } end
       it 'fails' do
-        expect { subject.call }.to raise_error(/expects a String value/)
+        expect { subject.call }.to raise_error(/expects a/)
       end
     end
 
@@ -263,7 +269,7 @@ describe 'apt::key' do
         :options => {},
       } end
       it 'fails' do
-        expect { subject.call }.to raise_error(/expects a String value/)
+        expect { subject.call }.to raise_error(/expects a/)
       end
     end