Sha256: abd524db204fc20e455e6672dc7545d957e8d3b3022166f7f022f9e4edb2bd8f

Contents?: true

Size: 697 Bytes

Versions: 9

Compression:

Stored size: 697 Bytes

Contents

# encoding: UTF-8

require File.expand_path('../../test_helper', __FILE__)


describe "TypeHierarchy" do

  before do
    @site = setup_site
  end

  after do
    teardown_site
  end

  it "has an empty supertype" do
    ::Content.supertype.must_be_nil
    refute ::Content.supertype?
  end

  describe "Schema classes" do
    before do
      class SchemaClass < ::Piece
      end
    end
    after do
      Object.send :remove_const, :SchemaClass
    end
    it "have a reference to their super type" do
      SchemaClass.supertype.must_equal ::Piece
    end

    it "know what file they were defined in" do
      SchemaClass.__source_file.must_equal File.expand_path(__FILE__)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta10 test/unit/test_type_hierarchy.rb
spontaneous-0.2.0.beta9 test/unit/test_type_hierarchy.rb
spontaneous-0.2.0.beta8 test/unit/test_type_hierarchy.rb
spontaneous-0.2.0.beta7 test/unit/test_type_hierarchy.rb
spontaneous-0.2.0.beta6 test/unit/test_type_hierarchy.rb
spontaneous-0.2.0.beta5 test/unit/test_type_hierarchy.rb
spontaneous-0.2.0.beta4 test/unit/test_type_hierarchy.rb
spontaneous-0.2.0.beta3 test/unit/test_type_hierarchy.rb
spontaneous-0.2.0.beta2 test/unit/test_type_hierarchy.rb