Sha256: bfd0a4185ae12f3a33b1793c736195a897e540e2206bf98a8f4b931d639bed8b
Contents?: true
Size: 1.13 KB
Versions: 73
Compression:
Stored size: 1.13 KB
Contents
require 'spec_helper' describe ActiveFedora::Base do describe ".property" do context "when the same predicate is used for two properties" do let(:warningMsg) { "Same predicate (http://purl.org/dc/terms/title) used for properties title1 and title2" } it "warns" do # Note that the expect test must be before the class is parsed. expect(described_class.logger).to receive(:warn).with(warningMsg) module TestModel1 class Book < ActiveFedora::Base property :title1, predicate: ::RDF::Vocab::DC.title property :title2, predicate: ::RDF::Vocab::DC.title end end end end context "when properties are created with different predicates" do it "does not warn" do # Note that the expect test must be before the class is parsed. expect(described_class.logger).to_not receive(:warn) module TestModel2 class Book < ActiveFedora::Base property :title1, predicate: ::RDF::Vocab::DC.title property :title2, predicate: ::RDF::Vocab::DC.creator end end end end end end
Version data entries
73 entries across 73 versions & 1 rubygems