Sha256: 1186189ca26bba89e5d26d0a65f1af7714acd9891b36e7215aea2e928681459d
Contents?: true
Size: 1.05 KB
Versions: 10
Compression:
Stored size: 1.05 KB
Contents
RSpec.describe ActiveFedora::Base do describe ".find" do let!(:collection) { FactoryGirl.create(:collection) } describe "when called on the wrong class" do it "should raise an exception" do expect { Item.find(collection.pid) }.to raise_error(Ddr::Models::ContentModelError) end end describe "when called on Ddr::Models::Base" do it "should cast to the object's class" do expect(Ddr::Models::Base.find(collection.pid)).to eq(collection) end end describe "when called on ActiveFedora::Base" do it "should cast to the object's class" do expect(ActiveFedora::Base.find(collection.pid)).to eq(collection) end end describe "when called on the object's class" do it "should return the object" do expect(Collection.find(collection.pid)).to eq(collection) end end end its(:captionable?) { is_expected.to be false } it { is_expected.not_to be_captioned } its(:can_be_streamable?) { is_expected.to be false } it { is_expected.not_to be_streamable } end
Version data entries
10 entries across 10 versions & 1 rubygems