summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/ec2_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/ec2_spec.rb')
-rw-r--r--spec/unit/plugins/ec2_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/plugins/ec2_spec.rb b/spec/unit/plugins/ec2_spec.rb
index 09742209..199426a6 100644
--- a/spec/unit/plugins/ec2_spec.rb
+++ b/spec/unit/plugins/ec2_spec.rb
@@ -26,6 +26,12 @@ describe Ohai::System, "plugin ec2" do
@plugin[:network] = {:interfaces => {:eth0 => {} } }
end
+ after(:each) do
+ if Ohai::NamedPlugin.send(:const_defined?, :EC2)
+ Ohai::NamedPlugin.send(:remove_const, :EC2)
+ end
+ end
+
shared_examples_for "!ec2" do
it "should NOT attempt to fetch the ec2 metadata" do
@plugin.should_not_receive(:http_client)