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-1.6.5 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.6.4 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.6.3 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.6.2 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.6.1 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.6.0 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.5.2 spec/lib/sinclair/env_settable_spec.rb
sinclair-1.5.1 spec/lib/sinclair/env_settable_spec.rb