Sha256: 61744b9bf5d92f118b20e2ff67cddedfeced7436bdcda5b04d5a177a90160fce

Contents?: true

Size: 792 Bytes

Versions: 28

Compression:

Stored size: 792 Bytes

Contents

require 'spec_helper'

describe ActiveFedora::RdfNode do
  describe "inheritance" do
    before do
      class Parent
        include ActiveFedora::RdfObject
        map_predicates do |map|
          map.title(in: RDF::DC)
        end
      end

      class Child < Parent
        map_predicates do |map|
          map.description(in: RDF::DC)
        end
      end

    end
    after do
      Object.send(:remove_const, :Child)
      Object.send(:remove_const, :Parent)
    end

    describe "child class" do
      it "should inherit the terms" do
        Child.config.keys.should == ['title', 'description']
      end
    end
    describe "parent class" do
      it "should not be infected with the child terms" do
        Parent.config.keys.should == ['title']
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
active-fedora-6.7.8 spec/unit/rdf_node_spec.rb
active-fedora-6.7.7 spec/unit/rdf_node_spec.rb
active-fedora-7.0.0.rc2 spec/unit/rdf_node_spec.rb
active-fedora-6.7.6 spec/unit/rdf_node_spec.rb
active-fedora-7.0.0.rc1 spec/unit/rdf_node_spec.rb
active-fedora-6.7.5 spec/unit/rdf_node_spec.rb
active-fedora-7.0.0.pre3 spec/unit/rdf_node_spec.rb
active-fedora-6.7.4 spec/unit/rdf_node_spec.rb
active-fedora-7.0.0.pre2 spec/unit/rdf_node_spec.rb
active-fedora-7.0.0.pre1 spec/unit/rdf_node_spec.rb
active-fedora-6.7.3 spec/unit/rdf_node_spec.rb
active-fedora-6.7.2 spec/unit/rdf_node_spec.rb
active-fedora-6.7.1 spec/unit/rdf_node_spec.rb
active-fedora-6.7.0 spec/unit/rdf_node_spec.rb
active-fedora-6.7.0.rc1 spec/unit/rdf_node_spec.rb
active-fedora-6.6.1 spec/unit/rdf_node_spec.rb
active-fedora-6.6.0 spec/unit/rdf_node_spec.rb
active-fedora-6.6.0.rc5 spec/unit/rdf_node_spec.rb
active-fedora-6.6.0.rc4 spec/unit/rdf_node_spec.rb
active-fedora-6.6.0.rc3 spec/unit/rdf_node_spec.rb