summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/ssh_host_keys_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/ssh_host_keys_spec.rb')
-rw-r--r--spec/unit/plugins/ssh_host_keys_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/plugins/ssh_host_keys_spec.rb b/spec/unit/plugins/ssh_host_keys_spec.rb
index 4ead4478..f01b3e9b 100644
--- a/spec/unit/plugins/ssh_host_keys_spec.rb
+++ b/spec/unit/plugins/ssh_host_keys_spec.rb
@@ -47,6 +47,12 @@ describe Ohai::System, "ssh_host_key plugin" do
IO.stub(:read).with("/etc/ssh/ssh_host_ecdsa_key.pub").and_return(@ecdsa_key)
end
+ after(:each) do
+ if Ohai::NamedPlugin.send(:const_defined?, :SSHHostKey)
+ Ohai::NamedPlugin.send(:remove_const, :SSHHostKey)
+ end
+ end
+
shared_examples "loads keys" do
it "reads the key and sets the dsa attribute correctly" do
@plugin.run