Sha256: 9b0c9fac42556a4d4b64157a730f8e8185ed67177a3a37a5fa37dc050fa75bc9
Contents?: true
Size: 710 Bytes
Versions: 13
Compression:
Stored size: 710 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) { Book.create_reflection(:has_many, :pages, { 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
13 entries across 13 versions & 1 rubygems