Sha256: a67ab37f43d34ea8e2e5af5b768887499648ed13f5dfa8d4a032ef28ece32526
Contents?: true
Size: 724 Bytes
Versions: 34
Compression:
Stored size: 724 Bytes
Contents
require 'spec_helper' describe ActiveFedora::Associations::CollectionProxy do before do class Book < ActiveFedora::Base end class Page < ActiveFedora::Base end end after do Object.send(:remove_const, :Page) Object.send(:remove_const, :Book) end describe "#spawn" do let(:reflection) { ActiveFedora::Reflection.create(:has_many, :pages, nil, { predicate: ActiveFedora::RDF::Fcrepo::RelsExt.isMemberOfCollection }, Book) } let(:association) { ActiveFedora::Associations::HasManyAssociation.new(Book.new, reflection) } let(:proxy) { described_class.new(association) } subject { proxy.spawn } it { is_expected.to be_instance_of ActiveFedora::Relation } end end
Version data entries
34 entries across 34 versions & 1 rubygems