Sha256: 9484c3506a88627131cb24f84097d4111f865c4a28e7139d026e75d49878e634

Contents?: true

Size: 553 Bytes

Versions: 4

Compression:

Stored size: 553 Bytes

Contents

FactoryGirl.define do
  factory :app, :class => CFoundry::V2::App do
    guid { FactoryGirl.generate(:guid) }
    name { FactoryGirl.generate(:random_string) }
    memory 128
    total_instances 0
    production false
    state "STOPPED"

    ignore do
      routes []
      service_bindings []
    end

    initialize_with do
      CFoundry::V2::App.new(nil, nil)
    end

    after_build do |app, evaluator|
      %w{name routes service_bindings}.each do |attr|
        RR.stub(app).__send__(attr) { evaluator.send(attr) }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cfoundry-0.4.16 spec/factories/app_factory.rb
cfoundry-0.4.15 spec/factories/app_factory.rb
cfoundry-0.4.14 spec/factories/app_factory.rb
cfoundry-0.4.13 spec/factories/app_factory.rb