Sha256: d7cdac894128efd08422fc5379496951329d0c34cef91794640c9e775346a7c6

Contents?: true

Size: 747 Bytes

Versions: 19

Compression:

Stored size: 747 Bytes

Contents

require 'spec_helper'
require 'uri'

describe Gem::RemoteFetcher do

  def create_fetcher()
    fetcher = subject
    return fetcher
  end

  describe "#https?" do
    it "returns true when protocol is https" do
      fetcher = create_fetcher()
      fetcher.https?(URI("https://www.example.com")).should be_true
    end

    it "returns false when protocol is http" do
      fetcher = create_fetcher()
      fetcher.https?(URI("http://www.example.com")).should be_false
    end
  end

#  describe "#configure_connection_for_https" do
#    it "configures ssl settings on the connection" do
#      fetcher = create_fetcher()
#      connection =  #mock Net::HTTP object
#      fetcher.configure_connection_for_https(connection)
#    end
#  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rubygems_ssl-client-certs-0.0.4.pre.alpha.pre.68 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.67 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.66 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.65 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.64 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.63 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.62 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.61 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.60 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.59 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.58 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.2 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.2.pre.alpha.pre.56 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.2.pre.alpha.pre.55 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.2.pre.alpha.pre.54 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.2.pre.alpha.pre.53 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.2.pre.alpha.pre.52 spec/gem_remote_fetcher_spec.rb
rubygems_ssl-client-certs-0.0.2.pre.alpha.pre.51 spec/gem_remote_fetcher_spec.rb