Sha256: 059c0a9bb425e765262450994de1465cca048a29c3e7f1768873c45a518c982a

Contents?: true

Size: 715 Bytes

Versions: 13

Compression:

Stored size: 715 Bytes

Contents

require 'spec_helper'

module Vzaar
  describe Connection do
    let(:params) { { server: server } }

    subject { described_class.new params }

    describe "#server" do
      context "when server params includes http protocol" do
        let(:server) { "http://example.com" }
        specify { expect(subject.server).to eq("example.com") }
      end

      context "when server params includes https protocol" do
        let(:server) { "https://example.com" }
        specify { expect(subject.server).to eq("example.com") }
      end

      context "when server param is blank" do
        let(:server) { nil }
        specify { expect(subject.server).to eq(described_class::SERVER) }
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vzaar-1.6.2 spec/vzaar/connection_spec.rb
vzaar-1.6.1 spec/vzaar/connection_spec.rb
vzaar-1.6.0 spec/vzaar/connection_spec.rb
vzaar-1.5.3 spec/vzaar/connection_spec.rb
vzaar-1.5.2 spec/vzaar/connection_spec.rb
vzaar-1.5.1 spec/vzaar/connection_spec.rb
vzaar-1.5.0 spec/vzaar/connection_spec.rb
vzaar-1.4.4 spec/vzaar/connection_spec.rb
vzaar-1.4.1 spec/vzaar/connection_spec.rb
vzaar-1.3.1 spec/vzaar/connection_spec.rb
vzaar-1.3.0 spec/vzaar/connection_spec.rb
vzaar-1.2.4 spec/vzaar/connection_spec.rb
vzaar-1.2.3 spec/vzaar/connection_spec.rb