Sha256: 3fe08408a2e0efb1603e6faf2393c7e4c1c3c0b303643b807926c228ec200d52

Contents?: true

Size: 721 Bytes

Versions: 9

Compression:

Stored size: 721 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 { [] }
  created_at { Time.now }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
aptible-cli-0.20.0 spec/fabricators/account_fabricator.rb
aptible-cli-0.19.9 spec/fabricators/account_fabricator.rb
aptible-cli-0.19.7 spec/fabricators/account_fabricator.rb
aptible-cli-0.19.6 spec/fabricators/account_fabricator.rb
aptible-cli-0.19.4 spec/fabricators/account_fabricator.rb
aptible-cli-0.19.3 spec/fabricators/account_fabricator.rb
aptible-cli-0.19.2 spec/fabricators/account_fabricator.rb
aptible-cli-0.19.1 spec/fabricators/account_fabricator.rb
aptible-cli-0.19.0 spec/fabricators/account_fabricator.rb