Sha256: e2f82370fb6daec8bea4519684f91dbc107259128b256db17661086046985cb8

Contents?: true

Size: 563 Bytes

Versions: 1

Compression:

Stored size: 563 Bytes

Contents

FactoryGirl.define do
  factory :child_resource do

    parent_resource

    r_boolean true
    r_date Date.today
    r_datetime DateTime.now
    r_decimal 3.14
    r_float 3.14
    r_integer 3
    r_string "my string"
    r_text "my text"
    r_time Time.now

    factory :child_with_grand_children do
        ignore do
            grand_children_count 3
        end

        after(:create) do |child, evaluator|
            create_list(:grand_child_resource, evaluator.grand_children_count,
                child_resource: child)
        end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
controlled_versioning-0.7.2 spec/factories/child_resources.rb