Sha256: e35b25a0a839c432930aff42d4f7cda18b8e5477aed0e56cb92ffe75add0f08e
Contents?: true
Size: 1.35 KB
Versions: 16
Compression:
Stored size: 1.35 KB
Contents
FactoryGirl.define do factory :yuri_unicorn_resource, class: PublishMyData::Resource do initialize_with { new(uri, graph_uri) } ignore do uri { "http://#{PublishMyData.local_domain}/id/unicorns/yuri" } graph_uri { "http://#{PublishMyData.local_domain}/graph/unicorns" } end after(:build) do |res| res.write_predicate(RDF::RDFS.label, 'Yuri The Unicorn') end end factory :boris_unicorn_resource, class: PublishMyData::Resource do initialize_with { new(uri, graph_uri) } ignore do uri { "http://#{PublishMyData.local_domain}/id/unicorns/boris" } graph_uri { "http://#{PublishMyData.local_domain}/graph/unicorns" } end after(:build) do |res| res.write_predicate(RDF::RDFS.label, 'Boris The Unicorn') res.write_predicate('http://example.com/knows', RDF::URI("http://pmdtest.dev/id/unicorns/yuri")) # knows yuri res.write_predicate('http://example.com/resides-in', RDF::URI("http://locations.example.com/foo")) # resides in foo county end end factory :foreign_resource, class: PublishMyData::Resource do initialize_with { new(uri, graph_uri) } ignore do uri { "http://locations.example.com/foo" } graph_uri { "http://#{PublishMyData.local_domain}/geo" } end after(:build) do |res| res.write_predicate(RDF::RDFS.label, 'Foo County') end end end
Version data entries
16 entries across 16 versions & 1 rubygems