spec/resources/factories/data_model/attribute_factory.rb in moblues-0.3.0 vs spec/resources/factories/data_model/attribute_factory.rb in moblues-0.4.0

- old
+ new

@@ -4,10 +4,11 @@ FactoryGirl.define do factory :attribute, class: Moblues::DataModel::Attribute do name 'attribute' type :string + optional false trait :string do type :string end @@ -33,8 +34,12 @@ trait :unknown do type :unknown end - initialize_with { new(name: name, type: type) } + trait :optional do + type :boolean + end + + initialize_with { new(name: name, type: type, optional: optional) } end end