]> gitweb.fluxo.info Git - puppet-sshkeys_core.git/commitdiff
Disable Rubocop RSpec/AnyInstance check for specific instances
authorJacob Helwig <jacob@technosorcery.net>
Mon, 25 Jun 2018 16:21:27 +0000 (09:21 -0700)
committerJacob Helwig <jacob@technosorcery.net>
Mon, 25 Jun 2018 18:26:53 +0000 (11:26 -0700)
There isn't really a clean way to disable FileBucket backups without
stubbing any_instance in these cases.

spec/integration/provider/ssh_authorized_key_spec.rb
spec/integration/provider/sshkey_spec.rb

index a4939181bf69cef9c1b685df303fc33c5f53a10e..fd3ce1094fa083e52df89d7fef602ba5a6dad7d4 100644 (file)
@@ -70,7 +70,7 @@ describe Puppet::Type.type(:ssh_authorized_key).provider(:parsed), unless: Puppe
   end
 
   def run_in_catalog(*resources)
-    Puppet::FileBucket::Dipper.any_instance.stubs(:backup) # Don't backup to the filebucket
+    Puppet::FileBucket::Dipper.any_instance.stubs(:backup) # rubocop:disable RSpec/AnyInstance
     catalog = Puppet::Resource::Catalog.new
     catalog.host_config = false
     resources.each do |resource|
index ebe80fbc97ab50b7055b8edb778335cc8bceeb35..cd1f9bb191aaa8010305f0036fdb2f43a1a37e36 100644 (file)
@@ -12,7 +12,7 @@ describe Puppet::Type.type(:sshkey).provider(:parsed), unless: Puppet.features.m
 
   before :each do
     # Don't backup to filebucket
-    Puppet::FileBucket::Dipper.any_instance.stubs(:backup)
+    Puppet::FileBucket::Dipper.any_instance.stubs(:backup) # rubocop:disable RSpec/AnyInstance
     # We don't want to execute anything
     described_class.stubs(:filetype)
                    .returns Puppet::Util::FileType::FileTypeFlat