diff options
-rw-r--r-- | spec/unit/plugins/ec2_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/eucalyptus_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/plugins/openstack_spec.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/plugins/ec2_spec.rb b/spec/unit/plugins/ec2_spec.rb index 46888c6a..bf59c205 100644 --- a/spec/unit/plugins/ec2_spec.rb +++ b/spec/unit/plugins/ec2_spec.rb @@ -49,7 +49,7 @@ describe Ohai::System, "plugin ec2" do allow(t).to receive(:connect_nonblock).and_raise(Errno::EINPROGRESS) allow(Socket).to receive(:new).and_return(t) expect(@http_client).to receive(:get). - with("/").exactly(3).times. + with("/"). and_return(double("Net::HTTP Response", :body => "2012-01-12", :code => "200")) end diff --git a/spec/unit/plugins/eucalyptus_spec.rb b/spec/unit/plugins/eucalyptus_spec.rb index 8e113a09..426301af 100644 --- a/spec/unit/plugins/eucalyptus_spec.rb +++ b/spec/unit/plugins/eucalyptus_spec.rb @@ -36,7 +36,7 @@ describe Ohai::System, "plugin eucalyptus" do allow(plugin).to receive(:http_client).and_return(@http_client) expect(@http_client).to receive(:get). - with("/").twice. + with("/"). and_return(double("Net::HTTP Response", :body => "2012-01-12", :code => "200")) expect(@http_client).to receive(:get). with("/2012-01-12/meta-data/"). diff --git a/spec/unit/plugins/openstack_spec.rb b/spec/unit/plugins/openstack_spec.rb index 9dd52aef..843f864c 100644 --- a/spec/unit/plugins/openstack_spec.rb +++ b/spec/unit/plugins/openstack_spec.rb @@ -160,7 +160,7 @@ EOM }' end - let(:http_client) { double("Net::HTTP", :read_timeout= => nil) } + let(:http_client) { double("Net::HTTP", { :read_timeout= => nil, :keep_alive_timeout= => nil } ) } def allow_get(url, response_body) allow(http_client).to receive(:get). |