Permalink
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...
1 parent 4c32190 commit 5007845172f5a84add7ed2db29974297630355c5 Frank Webber committed Jan 19, 2011
Showing with 6 additions and 5 deletions.
  1. +4 −3 lib/happymapper.rb
  2. +1 −1 spec/fixtures/multi_street_address.xml
  3. +1 −1 spec/happymapper_spec.rb
View
@@ -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'
@@ -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
@@ -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

0 comments on commit 5007845

Please sign in to comment.