Created
February 18, 2009 21:42
-
-
Save thommay/66566 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
describe "with a client SSL cert" do | |
before(:each) do | |
@cert = File.join(File.dirname(__FILE__), "..", "data", "client-cert.pem") | |
@key = File.join(File.dirname(__FILE__), "..", "data", "client-cert.key") | |
@c = File.read(@cert) | |
@k = File.read(@key) | |
Chef::Config[:ssl_client_cert] = @cert | |
Chef::Config[:ssl_client_key] = @key | |
File.stub!(:read).with(@cert).and_return(@c) | |
File.stub!(:read).with(@key).and_return(@k) | |
end | |
it "should read the cert file" do | |
File.should_receive(:read).with(@cert).and_return(@c) | |
do_run_request | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment