diff --git a/spec/integration/type/file_spec.rb b/spec/integration/type/file_spec.rb index 4903141..12cceb8 100644 --- a/spec/integration/type/file_spec.rb +++ b/spec/integration/type/file_spec.rb @@ -28,7 +28,6 @@ Puppet.stubs(:err).with(regexp_matches(/ignore source permissions/)) Puppet.expects(:err).with(regexp_matches(/puppet fileserver URL/)) - Puppet.expects(:err).with(regexp_matches(/cannot be translated natively/)) graph = PuppetX::CatalogTranslation.to_mgmt(catalog) expect(graph['resources']).to_not include 'file' @@ -45,7 +44,6 @@ Puppet.stubs(:err).with(regexp_matches(/ignore source permissions/)) Puppet.expects(:err).with(regexp_matches(/multiple sources/)) - Puppet.expects(:err).with(regexp_matches(/cannot be translated natively/)) graph = PuppetX::CatalogTranslation.to_mgmt(catalog) expect(graph['resources']).to_not include 'file' diff --git a/spec/integration/type/package_spec.rb b/spec/integration/type/package_spec.rb index ab68a58..1f1c295 100644 --- a/spec/integration/type/package_spec.rb +++ b/spec/integration/type/package_spec.rb @@ -17,11 +17,10 @@ it "fails on unsupported ensure values" do %w{1.3.1-5 latest 10bpo81 held}.each do |ensure_value| - Puppet.expects(:err).with(regexp_matches(/cannot be translated/)).twice + Puppet.expects(:err).with(regexp_matches(/cannot be translated/)) catalog = resource_catalog("Package { provider => 'apt' } package { 'cowsay': ensure => '#{ensure_value}' }") graph = PuppetX::CatalogTranslation.to_mgmt(catalog) - # become 'exec puppet yamlresource' through the workaround expect(graph['resources']).to_not include('pkg') expect(graph['resources']).to include('pippet') end diff --git a/spec/unit/catalog_translation/type_spec.rb b/spec/unit/catalog_translation/type_spec.rb index af98def..5c4649d 100644 --- a/spec/unit/catalog_translation/type_spec.rb +++ b/spec/unit/catalog_translation/type_spec.rb @@ -12,7 +12,6 @@ it "emits an error" do Puppet.expects(:err).with(regexp_matches /cannot translate.*hasrestart/) - Puppet.expects(:err).with(regexp_matches /cannot be translated natively/) translator.translate!(resource) end diff --git a/spec/unit/catalog_translation_spec.rb b/spec/unit/catalog_translation_spec.rb index ebc9555..024d060 100644 --- a/spec/unit/catalog_translation_spec.rb +++ b/spec/unit/catalog_translation_spec.rb @@ -129,7 +129,7 @@ it "does not touch the catalog indirection terminus" do catalog_face.expects(:find) catalog_face.expects(:set_terminus).never - subject.get_catalog + expect { subject.get_catalog }.to raise_error(Puppet::Error) end end