Sha256: ef13f6cc77edad66791feec753e3bbc9316ef91193f1e96831dc1320bb011340

Contents?: true

Size: 396 Bytes

Versions: 13

Compression:

Stored size: 396 Bytes

Contents

require "spec_helper"

describe URI::HTTP do

  describe "ssl?" do
    it "returns true for https URI's" do
      URI("https://example.com").ssl?.should be_true
    end

    it "returns false for non-https URI's" do
      URI("http://example.com").ssl?.should be_false
    end

    it "returns nil for invalid URI's without a scheme" do
      URI("example").ssl?.should be_nil
    end
  end

end

Version data entries

13 entries across 13 versions & 5 rubygems

Version Path
johnreitano-savon-0.7.7.5 spec/savon/core_ext/uri_spec.rb
johnreitano-savon-0.7.7.4 spec/savon/core_ext/uri_spec.rb
johnreitano-savon-0.7.7.3 spec/savon/core_ext/uri_spec.rb
johnreitano-savon-0.7.7.2 spec/savon/core_ext/uri_spec.rb
tictoc-savon-0.7.9 spec/savon/core_ext/uri_spec.rb
pyu-savon-0.7.9.3 spec/savon/core_ext/uri_spec.rb
johnreitano-savon-0.7.7.1 spec/savon/core_ext/uri_spec.rb
hoopla-savon-0.7.9 spec/savon/core_ext/uri_spec.rb
savon-0.7.9 spec/savon/core_ext/uri_spec.rb
savon-0.7.8 spec/savon/core_ext/uri_spec.rb
savon-0.7.7 spec/savon/core_ext/uri_spec.rb
hoopla-savon-0.7.6 spec/savon/core_ext/uri_spec.rb
savon-0.7.6 spec/savon/core_ext/uri_spec.rb