Commit 44085d6

mo khan <mo@mokhan.ca>
2015-04-08 14:56:46
start to define api for svg generation.
1 parent a63b043
lib/scale/svg.rb
@@ -0,0 +1,7 @@
+module Scale
+  class SVG
+    def to_xml
+      ""
+    end
+  end
+end
lib/scale.rb
@@ -1,5 +1,6 @@
 require "scale/version"
+require "scale/svg"
 
 module Scale
-  # Your code goes here...
+  # Your code goes here... NOT!
 end
spec/scale_spec.rb
@@ -4,8 +4,4 @@ describe Scale do
   it 'has a version number' do
     expect(Scale::VERSION).not_to be nil
   end
-
-  it 'does something useful' do
-    expect(false).to eq(true)
-  end
 end
spec/svg_spec.rb
@@ -0,0 +1,12 @@
+describe Scale::SVG do
+  subject { Scale::SVG.new }
+
+  it 'produces and empty xml document' do
+    result = subject.to_xml
+    expected = <<-XML
+    <svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg">
+    </svg>
+    XML
+    expect(result).to eql(expected)
+  end
+end
.rspec
@@ -1,2 +1,3 @@
 --format documentation
 --color
+--require spec_helper