Sha256: 8a4ce84d75d9d35b01d03bc0a9301bc89e6a1e4b195828522b2416dbc0854299

Contents?: true

Size: 645 Bytes

Versions: 28

Compression:

Stored size: 645 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' }

  it_behaves_like 'settings reading from env'

  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' }

    it_behaves_like 'settings reading from env'
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
sinclair-2.0.1 spec/lib/sinclair/env_settable_spec.rb
sinclair-2.0.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.16.3 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.16.2 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.16.1 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.16.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.15.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.14.2 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.14.1 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.14.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.13.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.12.1 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.12.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.11.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.10.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.9.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.8.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.7.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.6.7 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.6.6 spec/lib/sinclair/env_settable_spec.rb