test/xml_test.rb in representable-1.2.7 vs test/xml_test.rb in representable-1.2.8

- old
+ new

@@ -122,25 +122,25 @@ assert_xml_equal "<group><name>Rise Against</name></group>", klass.new("Rise Against").to_node.to_s end end - describe "XML#binding_for_definition" do + describe "XML::Binding#build_for" do it "returns AttributeBinding" do - assert_kind_of XML::AttributeBinding, @band.send(:xml_binding_for_definition, Def.new(:band, :from => "band", :attribute => true)) + assert_kind_of XML::AttributeBinding, XML::PropertyBinding.build_for(Def.new(:band, :from => "band", :attribute => true)) end it "returns PropertyBinding" do - assert_kind_of XML::PropertyBinding, @band.send(:xml_binding_for_definition, Def.new(:band, :class => Hash)) - assert_kind_of XML::PropertyBinding, @band.send(:xml_binding_for_definition, Def.new(:band, :from => :content)) + assert_kind_of XML::PropertyBinding, XML::PropertyBinding.build_for(Def.new(:band, :class => Hash)) + assert_kind_of XML::PropertyBinding, XML::PropertyBinding.build_for(Def.new(:band, :from => :content)) end it "returns CollectionBinding" do - assert_kind_of XML::CollectionBinding, @band.send(:xml_binding_for_definition, Def.new(:band, :collection => :true)) + assert_kind_of XML::CollectionBinding, XML::PropertyBinding.build_for(Def.new(:band, :collection => :true)) end it "returns HashBinding" do - assert_kind_of XML::HashBinding, @band.send(:xml_binding_for_definition, Def.new(:band, :hash => :true)) + assert_kind_of XML::HashBinding, XML::PropertyBinding.build_for(Def.new(:band, :hash => :true)) end end describe "DCI" do