Sha256: 23d660de12a5f9e13a0c8d519a62d8500d9b69be6a77c3d4c0ea7a5a64bbeec0

Contents?: true

Size: 395 Bytes

Versions: 37

Compression:

Stored size: 395 Bytes

Contents

# frozen_string_literal: true

class MockConfigClient
  def initialize(config_values = {})
    @config_values = config_values
  end

  def get(key, default = nil)
    @config_values.fetch(key, default)
  end

  def get_config(key)
    PrefabProto::Config.new(value: @config_values[key], key: key)
  end

  def mock_this_config(key, config_value)
    @config_values[key] = config_value
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
prefab-cloud-ruby-1.8.8.pre.1 test/support/mock_config_client.rb
prefab-cloud-ruby-1.8.7 test/support/mock_config_client.rb
prefab-cloud-ruby-1.8.6 test/support/mock_config_client.rb
prefab-cloud-ruby-1.8.5 test/support/mock_config_client.rb
prefab-cloud-ruby-1.8.4 test/support/mock_config_client.rb
prefab-cloud-ruby-1.8.3 test/support/mock_config_client.rb
prefab-cloud-ruby-1.8.2 test/support/mock_config_client.rb
prefab-cloud-ruby-1.8.1 test/support/mock_config_client.rb
prefab-cloud-ruby-1.8.0 test/support/mock_config_client.rb
prefab-cloud-ruby-1.7.2 test/support/mock_config_client.rb
prefab-cloud-ruby-1.7.1 test/support/mock_config_client.rb
prefab-cloud-ruby-1.7.0 test/support/mock_config_client.rb
prefab-cloud-ruby-1.6.2 test/support/mock_config_client.rb
prefab-cloud-ruby-1.6.1 test/support/mock_config_client.rb
prefab-cloud-ruby-1.6.0 test/support/mock_config_client.rb
prefab-cloud-ruby-1.5.1 test/support/mock_config_client.rb
prefab-cloud-ruby-1.6.0.pre2 test/support/mock_config_client.rb
prefab-cloud-ruby-1.6.0.pre1 test/support/mock_config_client.rb
prefab-cloud-ruby-0 test/support/mock_config_client.rb
prefab-cloud-ruby-1.5.0 test/support/mock_config_client.rb