Sha256: e43b3cf91656183538c5065dd09e655bd02b1822b07273c86fa83a30a8909a3f
Contents?: true
Size: 1013 Bytes
Versions: 2
Compression:
Stored size: 1013 Bytes
Contents
FactoryGirl.define do factory :promotion_attribute do name "Attribute Name" # Data Type could be text, integer, date, list_drop_down (Select from a List), list_radio_button (Choose one) & boolean (Checkbox) data_type "text" mandatory false promotion end factory :text_promotion_attribute, parent: :promotion_attribute do data_type "text" end factory :integer_promotion_attribute, parent: :promotion_attribute do data_type "integer" end factory :date_promotion_attribute, parent: :promotion_attribute do data_type "date" end factory :list_drop_down_promotion_attribute, parent: :promotion_attribute do data_type "list_drop_down" values ["Value 1", "Value 2", "Value 3"] end factory :list_radio_button_promotion_attribute, parent: :promotion_attribute do data_type "list_radio_button" values ["Radio 1", "Radio 2", "Radio 3"] end factory :boolean_promotion_attribute, parent: :promotion_attribute do data_type "boolean" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dhatu-0.1.13 | spec/dummy/spec/factories/promotion_attributes.rb |
dhatu-0.1.12 | spec/dummy/spec/factories/promotion_attributes.rb |