Sha256: f260203923153649502ddac8b8865a3354bd6bb30c22b4291df2621fc8025eff

Contents?: true

Size: 725 Bytes

Versions: 28

Compression:

Stored size: 725 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
    subject { proxy.spawn }

    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) }

    it { is_expected.to be_instance_of ActiveFedora::Relation }
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
active-fedora-12.2.4 spec/unit/collection_proxy_spec.rb
active-fedora-12.2.3 spec/unit/collection_proxy_spec.rb
active-fedora-11.5.6 spec/unit/collection_proxy_spec.rb
active-fedora-12.2.2 spec/unit/collection_proxy_spec.rb
active-fedora-11.2.1 spec/unit/collection_proxy_spec.rb
active-fedora-12.2.1 spec/unit/collection_proxy_spec.rb
active-fedora-12.0.3 spec/unit/collection_proxy_spec.rb
active-fedora-11.5.5 spec/unit/collection_proxy_spec.rb
active-fedora-13.1.2 spec/unit/collection_proxy_spec.rb
active-fedora-13.1.1 spec/unit/collection_proxy_spec.rb
active-fedora-13.1.0 spec/unit/collection_proxy_spec.rb
active-fedora-13.0.0 spec/unit/collection_proxy_spec.rb
active-fedora-12.1.1 spec/unit/collection_proxy_spec.rb
active-fedora-12.1.0 spec/unit/collection_proxy_spec.rb
active-fedora-11.5.4 spec/unit/collection_proxy_spec.rb
active-fedora-11.5.3 spec/unit/collection_proxy_spec.rb
active-fedora-12.0.2 spec/unit/collection_proxy_spec.rb
active-fedora-12.0.1 spec/unit/collection_proxy_spec.rb
active-fedora-11.5.2 spec/unit/collection_proxy_spec.rb
active-fedora-12.0.0 spec/unit/collection_proxy_spec.rb