diff --git a/test/as_test.rb b/test/as_test.rb index d8f4004d..ea1ef330 100644 --- a/test/as_test.rb +++ b/test/as_test.rb @@ -40,4 +40,26 @@ class AsTest < MiniTest::Spec it { parse(song, {"[{:volume=>1}]" => "Wie Es Geht"}, :volume => 1).name.must_equal "Wie Es Geht" } end end +end + + +# hash: to_hash(wrap: ) is representation_wrap + +class AsXmlTest < MiniTest::Spec + Band = Struct.new(:name, :label) + Album = Struct.new(:band) + Label = Struct.new(:name) + + representer!(module: Representable::XML, decorator: true) do + self.representation_wrap = :album + property :band, as: :combo do + self.representation_wrap = :band + property :name + end + end + + it do + skip + representer.new(Album.new(Band.new("Offspring"))).to_xml.must_equal "" + end end \ No newline at end of file