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

Version Path
active-fedora-11.1.4 spec/unit/collection_proxy_spec.rb
active-fedora-11.1.3 spec/unit/collection_proxy_spec.rb
active-fedora-11.1.2 spec/unit/collection_proxy_spec.rb
active-fedora-11.1.1 spec/unit/collection_proxy_spec.rb
active-fedora-11.1.0 spec/unit/collection_proxy_spec.rb
active-fedora-10.3.0 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.1 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.0 spec/unit/collection_proxy_spec.rb
active-fedora-10.3.0.rc2 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.0.rc7 spec/unit/collection_proxy_spec.rb
active-fedora-10.3.0.rc1 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.0.rc6 spec/unit/collection_proxy_spec.rb
active-fedora-10.2.1 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.0.rc5 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.0.rc4 spec/unit/collection_proxy_spec.rb
active-fedora-10.2.0 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.0.rc3 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.0.rc2 spec/unit/collection_proxy_spec.rb
active-fedora-11.0.0.rc1 spec/unit/collection_proxy_spec.rb
active-fedora-10.1.0 spec/unit/collection_proxy_spec.rb