Sha256: caccd532f3609d88485ed25236ab2590a3593935168bf256aa47ff944b84ecd4
Contents?: true
Size: 874 Bytes
Versions: 7
Compression:
Stored size: 874 Bytes
Contents
FactoryGirl.define do factory :parent_resource do 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 :parent_with_children do ignore do children_count 3 end before(:create) do |parent, evaluator| create_list(:child_resource, evaluator.children_count, parent_resource: parent) end end factory :parent_with_grand_children do ignore do children_count 3 end before(:create) do |parent, evaluator| create_list(:child_with_grand_children, evaluator.children_count, parent_resource: parent) end end initialize_with { ParentResource.create_with_version(attribute_lists) } end end
Version data entries
7 entries across 7 versions & 1 rubygems