--- /dev/null
+# rcov generated
+coverage
+
+# rdoc generated
+rdoc
+
+# yard generated
+doc
+.yardoc
+
+# bundler
+.bundle
+
+# jeweler generated
+pkg
+
+# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
+#
+# * Create a file at ~/.gitignore
+# * Include files you want ignored
+# * Run: git config --global core.excludesfile ~/.gitignore
+#
+# After doing this, these files will be ignored in all your git projects,
+# saving you from having to 'pollute' every project you touch with them
+#
+# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
+#
+# For MacOS:
+#
+#.DS_Store
+
+# For TextMate
+#*.tmproj
+#tmtags
+
+# For emacs:
+*~
+\#*
+.\#*
+
+# For vim:
+#*.swp
+
+# For redcar:
+#.redcar
+
+# For rubinius:
+#*.rbc
--- /dev/null
+require 'erd_handler/erd'
+require "rexml/document"
+include REXML
+
--- /dev/null
+module Erd
+ class Erd
+ def initialize(source = nil)
+ doc = Document.new source
+ raise InvalidErdFile unless doc.elements.length == 1 and doc.elements[1].name.downcase == 'drawing'
+ end
+ end
+end
--- /dev/null
+require 'spec_helper'
+
+module Erd
+ describe Erd do
+ let(:input) { double('input').as_null_object }
+ let(:output) { double('output').as_null_object }
+ let(:erd) { Erd.new(input, output) }
+
+ describe "#read" do
+ it "reads a single box" do
+ doc = Document.new File.new("spec/fixtures/single_box_erd.xml")
+ erd = Erd.new doc
+ erd.mark.should == 6.5
+ erd.boxes.length.should == 1
+
+ end
+ end # #read
+ end
+end
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+ <Drawing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="Untitled" mark="6.5">
+
+<box id="0" name="Client" mark="0.0">
+ <location x="33.0" y="43.0"/>
+ <size width="80.0" height="40.0"/>
+ <comment></comment>
+</box>
+</Drawing>
--- /dev/null
+require 'erd_handler'
+require "rexml/document"
+include REXML
\ No newline at end of file