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-10.1.0.rc1 spec/unit/collection_proxy_spec.rb
active-fedora-10.0.0 spec/unit/collection_proxy_spec.rb
active-fedora-10.0.0.beta4 spec/unit/collection_proxy_spec.rb
active-fedora-10.0.0.beta3 spec/unit/collection_proxy_spec.rb
active-fedora-10.0.0.beta2 spec/unit/collection_proxy_spec.rb
active-fedora-10.0.0.beta1 spec/unit/collection_proxy_spec.rb
active-fedora-9.13.0 spec/unit/collection_proxy_spec.rb
active-fedora-9.12.0 spec/unit/collection_proxy_spec.rb
active-fedora-9.11.0 spec/unit/collection_proxy_spec.rb
active-fedora-9.10.4 spec/unit/collection_proxy_spec.rb
active-fedora-9.10.3 spec/unit/collection_proxy_spec.rb
active-fedora-9.10.2 spec/unit/collection_proxy_spec.rb
active-fedora-9.10.1 spec/unit/collection_proxy_spec.rb
active-fedora-9.10.0 spec/unit/collection_proxy_spec.rb