summaryrefslogtreecommitdiff
path: root/spec/ruby/library/rexml/document/doctype_spec.rb
blob: 4d14460ef47b201cf530c52b2d2ecb023bdc5f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require_relative '../../../spec_helper'

ruby_version_is ''...'2.8' do
  require 'rexml/document'

  describe "REXML::Document#doctype" do
    it "returns the doctype" do
      d = REXML::Document.new
      dt = REXML::DocType.new("foo")
      d.add dt
      d.doctype.should == dt
    end

    it "returns nil if there's no doctype" do
      REXML::Document.new.doctype.should == nil
    end
  end
end