spec/resources/factories/data_model/attribute_factory.rb in moblues-0.1.0 vs spec/resources/factories/data_model/attribute_factory.rb in moblues-0.2.0

- old
+ new

@@ -5,8 +5,36 @@ FactoryGirl.define do factory :attribute, class: Moblues::DataModel::Attribute do name 'attribute' type :string + trait :string do + type :string + end + + trait :number do + type :number + end + + trait :decimal do + type :decimal + end + + trait :date do + type :date + end + + trait :data do + type :data + end + + trait :id do + type :id + end + + trait :unknown do + type :unknown + end + initialize_with { new(name: name, type: type) } end end