test/xml_test.rb in representable-0.13.0 vs test/xml_test.rb in representable-0.13.1
- old
+ new
@@ -120,21 +120,21 @@
assert_xml_equal "<group><name>Rise Against</name></group>", klass.new("Rise Against").to_node.to_s
end
end
- describe "#binding_for_definition" do
+ describe "XML#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, Representable::XML.binding_for_definition(Def.new(:band, :from => "band", :attribute => true))
end
it "returns ObjectBinding" do
- assert_kind_of XML::ObjectBinding, @band.binding_for_definition(Def.new(:band, :class => Hash))
+ assert_kind_of XML::ObjectBinding, Representable::XML.binding_for_definition(Def.new(:band, :class => 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, Representable::XML.binding_for_definition(Def.new(:band, :from => :content))
end
end
describe "DCI" do
@@ -192,14 +192,14 @@
end
end
class AttributesTest < MiniTest::Spec
- describe ":from => @rel" do
+ describe ":from => rel, :attribute => true" do
class Link
include Representable::XML
- property :href, :from => "@href"
- property :title, :from => "@title"
+ property :href, :from => "href", :attribute => true
+ property :title, :from => "title", :attribute => true
attr_accessor :href, :title
end
it "#from_xml creates correct accessors" do
link = Link.from_xml(%{