Sha256: 28a0c70159b73c76b83fac6913cf91b93b4eb37b8d015b6b5a7370f728e6958c

Contents?: true

Size: 756 Bytes

Versions: 2

Compression:

Stored size: 756 Bytes

Contents

class StubAccount < OpenStruct
  def each_app(&block)
    return enum_for(:each_app) if block.nil?
    apps.each(&block)
  end

  def each_database(&block)
    return enum_for(:each_database) if block.nil?
    databases.each(&block)
  end

  def each_certificate(&block)
    return enum_for(:each_certificate) if block.nil?
    certificates.each(&block)
  end
end

Fabricator(:account, from: :stub_account) do
  id { Fabricate.sequence(:account_id) { |i| i } }
  bastion_host 'localhost'
  dumptruck_port 1234
  handle 'aptible'
  ca_body '--BEGIN FAKE CERT-- test --END FAKE CERT--'
  stack

  apps { [] }
  databases { [] }
  certificates { [] }
  log_drains { [] }
  metric_drains { [] }
  backup_retention_policies { [] }
  created_at { Time.now }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aptible-cli-0.22.0 spec/fabricators/account_fabricator.rb
aptible-cli-0.21.0 spec/fabricators/account_fabricator.rb