Sha256: 61d12dbd25072076b51818ce503211a3c832eae605f879fc3098cf26c06b82f6

Contents?: true

Size: 529 Bytes

Versions: 3

Compression:

Stored size: 529 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper')

describe RestClient do
  before do
    class RestClient::Request
      def self.execute(options = {})
        if options[:verify_ssl] == OpenSSL::SSL::VERIFY_PEER
          :secure
        else
          :insecure
        end
      end
    end
  end

  [:get, :post, :put, :delete].each do |method|
    describe method.to_s.upcase do
      it 'should support SSL' do
        RestClient.send(method, 'https://example.com', {}).should == :secure
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
restclient_with_cert-0.0.8 spec/restclient_with_cert_spec.rb
restclient_with_cert-0.0.7 spec/restclient_with_cert_spec.rb
restclient_with_cert-0.0.6 spec/restclient_with_cert_spec.rb