Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIX: Requires, XML, and Spec typo

 + HappyMapper could not be used with the examples because the require
   paths were not relative for the other files

 + Multi-Street Address XML was incorrect

 + Spec had a little typo
  • Loading branch information...
commit 5007845172f5a84add7ed2db29974297630355c5 1 parent 4c32190
Frank Webber authored
View
7 lib/happymapper.rb
@@ -1,3 +1,4 @@
+require 'rubygems'
require 'date'
require 'time'
require 'xml'
@@ -127,6 +128,6 @@ def parse(xml, options = {})
end
end
-require 'happymapper/item'
-require 'happymapper/attribute'
-require 'happymapper/element'
+require File.dirname(__FILE__) + '/happymapper/item'
+require File.dirname(__FILE__) + '/happymapper/attribute'
+require File.dirname(__FILE__) + '/happymapper/element'
View
2  spec/fixtures/multi_street_address.xml
@@ -3,7 +3,7 @@
<streetaddress>123 Smith Dr</streetaddress>
<streetaddress>Apt 31</streetaddress>
<city>Anytown</city>
- <stateOrProvince>ST<stateOrProvince>
+ <stateOrProvince>ST</stateOrProvince>
<zip>12345</zip>
<country>USA</country>
</address>
View
2  spec/happymapper_spec.rb
@@ -142,7 +142,7 @@ module Bar; class Baz; include HappyMapper; end; end
first.extended.should == 'ROXML is a Ruby library designed to make it easier for Ruby developers to work with XML. Using simple annotations, it enables Ruby classes to be custom-mapped to XML. ROXML takes care of the marshalling and unmarshalling of mapped attributes so that developers can focus on building first-class Ruby classes.'
end
- it "should parse xml elements to ruby objcts" do
+ it "should parse xml elements to ruby objects" do
statuses = Status.parse(fixture_file('statuses.xml'))
statuses.size.should == 20
first = statuses.first
Please sign in to comment.
Something went wrong with that request. Please try again.