Sha256: ea344a009e6e16cd0bffb03cc80afba3cf6f805e6289ac4399db6881a8964b2c

Contents?: true

Size: 408 Bytes

Versions: 30

Compression:

Stored size: 408 Bytes

Contents

FactoryGirl.define do
  factory :custom_field do
    sequence(:name) { |t| "name#{t}" }

    trait :number do
      field_type 'number'
    end

    trait :date do
      field_type 'date'
    end

    trait :text do
      field_type 'text'
    end

    factory :number_custom_field, traits: [:number]
    factory :date_custom_field, traits: [:date ]
    factory :text_custom_field, traits: [:text]
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
nimbleshop_core-0.0.23 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.21 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.20 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.19 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.17 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.16 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.15 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.14 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.14.rc2 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.14.rc1 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.13 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.12 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.11 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.10 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.9 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.8 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.7 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.5 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.4.beta1 test/factories/custom_field_factory.rb
nimbleshop_core-0.0.4 test/factories/custom_field_factory.rb