Sha256: 5f2b94926f6da9816a6693995c494e290ddc3cf5da308d5c77b34a99b4efdb33

Contents?: true

Size: 406 Bytes

Versions: 2

Compression:

Stored size: 406 Bytes

Contents

Makers.define do

  trait :user do
    association :user, maker: :owner
  end

  maker :user, aliases: :owner do
    name 'name'
    sequence(:username) { name }
    sequence(:email) { |n| "mail#{n}@example.com" }
    sequence(:phone)
    posts

    maker :user_with_age do
      age 9
    end
    maker :user_with_posts do
      posts 2, strategy: :create
    end
  end

  maker :post, traits: :user

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
makers-4.0.0.4 test/dummy/test/makers.rb
makers-4.0.0.3 test/dummy/test/makers.rb