diff options
Diffstat (limited to 'spec/ruby/library/rexml/document/doctype_spec.rb')
-rw-r--r-- | spec/ruby/library/rexml/document/doctype_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/library/rexml/document/doctype_spec.rb b/spec/ruby/library/rexml/document/doctype_spec.rb new file mode 100644 index 0000000000..5f277f6ad6 --- /dev/null +++ b/spec/ruby/library/rexml/document/doctype_spec.rb @@ -0,0 +1,15 @@ +require 'rexml/document' +require File.expand_path('../../../../spec_helper', __FILE__) + +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 |