Sha256: 2746a4c76b5a1c2bf7b17207ad2088e124808d094a6c9d6c6597f06590758c4d

Contents?: true

Size: 685 Bytes

Versions: 23

Compression:

Stored size: 685 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Sinclair::Options do
  describe 'yard' do
    describe 'usage' do
      it 'creates options object' do
        options = ConnectionOptions.new(retries: 10, port: 8080)

        expect(options.timeout).to be_nil
        expect(options.retries).to eq(10)
        expect(options.port).to eq(8080)
        expect(options.protocol).to eq('https')
      end
    end

    describe '#to_h' do
      it 'returns options hash' do
        options = ConnectionOptions.new(retries: 10, port: 8080)

        expect(options.to_h)
          .to eq({ port: 8080, retries: 10, timeout: nil, protocol: 'https' })
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
sinclair-2.1.1 spec/integration/yard/sinclair/options_spec.rb
sinclair-2.1.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-2.0.1 spec/integration/yard/sinclair/options_spec.rb
sinclair-2.0.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.16.3 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.16.2 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.16.1 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.16.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.15.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.14.2 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.14.1 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.14.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.13.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.12.1 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.12.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.11.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.10.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.9.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.8.0 spec/integration/yard/sinclair/options_spec.rb
sinclair-1.7.0 spec/integration/yard/sinclair/options_spec.rb