Permalink
Browse files

Failing spec for attributes without a namespace inside of an element …

…with a namespace.
  • Loading branch information...
1 parent 374850a commit c84ed9047578cade1b3e8f4b4b3f3c3cecef3b61 @bkeepers bkeepers committed Jul 15, 2009
Showing with 6 additions and 0 deletions.
  1. +1 −0 spec/fixtures/nested_namespaces.xml
  2. +5 −0 spec/happymapper_spec.rb
@@ -5,6 +5,7 @@
<xmlContent>
<embeddedXMLContent>
<ns1:alert xmlns:ns1="http://schemas.google.com/analytics/2009">
+ <severity>Severe</severity>
<ns1:identifier>CDC-2006-183</ns1:identifier>
<ns1:info>
<ns1:category>Health</ns1:category>
View
@@ -592,6 +592,7 @@ class Alert
namespace 'http://schemas.google.com/analytics/2009'
element :identifier, String
+ element :severity, String, :namespace => false
has_one :info, Info
end
class Distribution
@@ -617,6 +618,10 @@ def mapping
it "should map sub elements of with nested namespace" do
mapping.alert.info.category.should == 'Health'
end
+
+ it "should map elements without a namespace" do
+ mapping.alert.severity.should == 'Severe'
+ end
end
end

0 comments on commit c84ed90

Please sign in to comment.