Sha256: 903c6a53d431195b9fa4affc9d396f68dc697a8488be30cf6a86c3e68f2bb3bc

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Sinclair::EnvSettable do
  subject(:settable) { Class.new(AppClient) }

  let(:username) { 'my_login' }
  let(:password) { Random.rand(10_000).to_s }

  let(:username_key) { 'USERNAME' }
  let(:password_key) { 'PASSWORD' }
  let(:host_key)     { 'HOST' }
  let(:port_key)     { 'PORT' }

  it_behaves_like 'settings reading'

  context 'when defining a prefix' do
    subject(:settable) { Class.new(MyAppClient) }

    let(:username_key) { 'MY_APP_USERNAME' }
    let(:password_key) { 'MY_APP_PASSWORD' }
    let(:host_key)     { 'MY_APP_HOST' }
    let(:port_key)     { 'MY_APP_PORT' }

    it_behaves_like 'settings reading'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinclair-2.1.1 spec/lib/sinclair/env_settable_spec.rb
sinclair-2.1.0 spec/lib/sinclair/env_settable_spec.rb