test/xml_test.rb in representable-0.10.0 vs test/xml_test.rb in representable-0.10.1
- old
+ new
@@ -63,12 +63,12 @@
@band.from_xml(@xml)
assert_equal ["Nofx", "NOFX"], [@band.name, @band.label]
end
it "forwards block to #from_node" do
- @band.from_xml(@xml) do |binding|
- binding.definition.name == "name"
+ @band.from_xml(@xml) do |name|
+ name == :name
end
assert_equal ["Nofx", nil], [@band.name, @band.label]
end
end
@@ -84,12 +84,12 @@
@band.from_node(@xml)
assert_equal ["Nofx", "NOFX"], [@band.name, @band.label]
end
it "forwards block to #update_properties_from" do
- @band.from_node(@xml) do |binding|
- binding.definition.name == "name"
+ @band.from_node(@xml) do |name|
+ name == :name
end
assert_equal ["Nofx", nil], [@band.name, @band.label]
end
end
@@ -102,11 +102,11 @@
it "forwards block to #to_node" do
band = @Band.new
band.name = "The Guinea Pigs"
band.label = "n/a"
- xml = band.to_xml do |binding|
- binding.definition.name == "name"
+ xml = band.to_xml do |name|
+ name == :name
end
assert_xml_equal "<band><name>The Guinea Pigs</name></band>", xml
end
end