Created
July 21, 2009 02:16
-
-
Save caryp/151058 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/spec/ohai/plugins/ec2_spec.rb b/spec/ohai/plugins/ec2_spec.rb | |
index 8ffb1ef..ddd046e 100644 | |
--- a/spec/ohai/plugins/ec2_spec.rb | |
+++ b/spec/ohai/plugins/ec2_spec.rb | |
@@ -51,6 +51,10 @@ describe Ohai::System, "plugin ec2" do | |
end | |
it "should recursively fetch all the ec2 metadata" do | |
+ IO.stub!(:select).and_return([[],[1],[]]) | |
+ t = mock("connection") | |
+ t.stub!(:connect_nonblock).and_raise(Errno::EINPROGRESS) | |
+ Socket.stub!(:new).and_return(t) | |
@ohai._require_plugin("ec2") | |
@ohai[:ec2].should_not be_nil | |
@ohai[:ec2]['instance_type'].should == "c1.medium" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment