From f2ce530d540e92c99bced2827c9cd1fe0bff5dac Mon Sep 17 00:00:00 2001 From: Tim Jarratt Date: Tue, 19 May 2015 23:20:06 -0700 Subject: [PATCH] Fix specs that use certificates and private keys At some point recently, something changed on Travis-CI such that the specs can no longer read these files using a relative file path. Changing these to use the absolute path works fabulously. --- spec/savon/builder_spec.rb | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/spec/savon/builder_spec.rb b/spec/savon/builder_spec.rb index 215f1b15..ffc072e5 100644 --- a/spec/savon/builder_spec.rb +++ b/spec/savon/builder_spec.rb @@ -83,10 +83,21 @@ end describe "#wsse_signature" do - let(:private_key) { "spec/fixtures/ssl/client_key.pem" } - let(:cert) { "spec/fixtures/ssl/client_cert.pem" } - let(:signature) { Akami::WSSE::Signature.new(Akami::WSSE::Certs.new(:cert_file => cert, :private_key_file => private_key))} - let(:globals) { Savon::GlobalOptions.new(wsse_signature: signature) } + let(:private_key) do + File.join(File.dirname(__FILE__), "spec/fixtures/ssl/client_key.pem") + end + let(:cert) do + File.join(File.dirname(__FILE__), "spec/fixtures/ssl/client_cert.pem") + end + let(:signature) do + Akami::WSSE::Signature.new( + Akami::WSSE::Certs.new( + :cert_file => cert, + :private_key_file => private_key + ) + ) + end + let(:globals) { Savon::GlobalOptions.new(wsse_signature: signature) } subject(:signed_message_nn) {Nokogiri::XML(builder.to_s).remove_namespaces!} subject(:signed_message) {Nokogiri::XML(builder.to_s)}