Sha256: 29e17de35384d1553ccccc471c19187bf23df919fc12b61944978103a4a6ffb2
Contents?: true
Size: 790 Bytes
Versions: 11
Compression:
Stored size: 790 Bytes
Contents
FactoryBot.define do factory :kithe_asset, class: 'Kithe::Asset' do title { "Some Asset" } trait :with_file do transient do file_object { File.open(Kithe::Engine.root.join("spec/test_support/images/1x1_pixel.jpg")) } end file { file_object } end trait :with_faked_metadata do with_file transient do faked_metadata { {} } end after(:build) do |model, evaluator| if evaluator.faked_metadata model.file.metadata.merge!(evaluator.faked_metadata.stringify_keys) end end end # No bytestreams, but a derivative trait :faked_derivatives do derivatives {[ Kithe::Derivative.new(key: "one"), Kithe::Derivative.new(key: "two") ]} end end end
Version data entries
11 entries across 11 versions & 1 rubygems