ontology_factory.rb revision 424daa90b3edaac75cda2e00d3a94e300f6a89c2
end
"#{Faker::Lorem.word}_#{n}"
end
iri { FactoryGirl.generate :iri }
name { FactoryGirl.generate :name }
logic { FactoryGirl.create :logic }
"#{ontology.parent.locid}//#{ontology.name}"
else
"/#{ontology.repository.path}/#{ontology.name}"
end
end
}, without_protection: true)
end
trait :with_version do
state: 'pending'
}, without_protection: true)
end
end
}, without_protection: true)
version.fast_parse = true
end
end
end
ontology.locid = "/#{ontology.repository.path}/#{ontology.name}"
end
# Should always be fully linked, so every child should
# have a linked (defined by the DO) pointing or sourcing
source: child_one,
end
end
}, without_protection: true)
version.fast_parse = true
source: child_one,
end
end
ontology.children << FactoryGirl.build(:ontology,
logic: logic_one,
parent: ontology,
repository: ontology.repository)
ontology.children << FactoryGirl.build(:ontology,
logic: logic_two,
parent: ontology,
repository: ontology.repository)
end
end
factory :homogeneous_ontology do |ontology|
ontology.after(:build) do |ontology|
logic_one = FactoryGirl.create(:logic)
ontology.children << FactoryGirl.create(:ontology,
logic: logic_one,
repository: ontology.repository)
ontology.children << FactoryGirl.create(:ontology,
logic: logic_one,
repository: ontology.repository)
end
end
end
end
end