Sha256: cae99ef8770e26c3b2cc5e0339e306b40a91c52ae4ebf81daabbdde2ec1d306f

Contents?: true

Size: 681 Bytes

Versions: 14

Compression:

Stored size: 681 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Sinclair::Config do
  describe 'yard' do
    describe '#to_hash' do
      subject(:config) { config_class.new }

      let(:config_class) { LoginConfig }

      it 'returns all configs hash' do
        expect(config.to_hash)
          .to eq('password' => nil, 'username' => 'bob')
      end

      it 'returns all configs hash on as_json calls' do
        expect(config.as_json)
          .to eq('password' => nil, 'username' => 'bob')
      end

      it 'returns all configs json on to_json calls' do
        expect(config.to_json)
          .to eq('{"password":null,"username":"bob"}')
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sinclair-1.6.7 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.6.6 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.6.5 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.6.4 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.6.3 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.6.2 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.6.1 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.6.0 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.5.2 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.5.1 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.5.0 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.4.2 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.4.1 spec/integration/yard/sinclair/config_spec.rb
sinclair-1.4.0 spec/integration/yard/sinclair/config_spec.rb