test/xml_test.rb in representable-0.10.2 vs test/xml_test.rb in representable-0.10.3
- old
+ new
@@ -30,10 +30,12 @@
include Representable::XML
self.representation_wrap = :band
representable_property :name
representable_property :label
end
+
+ @band = @Band.new
end
describe ".from_xml" do
it "is delegated to #from_xml" do
@@ -136,18 +138,18 @@
end
describe "#binding_for_definition" do
it "returns AttributeBinding" do
- assert_kind_of XML::AttributeBinding, @Band.binding_for_definition(Def.new(:band, :from => "@band"))
+ assert_kind_of XML::AttributeBinding, @band.binding_for_definition(Def.new(:band, :from => "@band"))
end
it "returns ObjectBinding" do
- assert_kind_of XML::ObjectBinding, @Band.binding_for_definition(Def.new(:band, :as => Hash))
+ assert_kind_of XML::ObjectBinding, @band.binding_for_definition(Def.new(:band, :as => Hash))
end
it "returns TextBinding" do
- assert_kind_of XML::TextBinding, @Band.binding_for_definition(Def.new(:band, :from => :content))
+ assert_kind_of XML::TextBinding, @band.binding_for_definition(Def.new(:band, :from => :content))
end
end
end
end