test/xml_bindings_test.rb in representable-1.8.1 vs test/xml_bindings_test.rb in representable-1.8.2

- old
+ new

@@ -24,11 +24,11 @@ end describe "PropertyBinding" do describe "with plain text" do before do - @property = Representable::XML::PropertyBinding.new(Representable::Definition.new(:song), nil, nil) + @property = Representable::XML::PropertyBinding.new(Representable::Definition.new(:song), nil, nil, {:doc => @doc}) end it "extracts with #read" do assert_equal "Thinning the Herd", @property.read(Nokogiri::XML("<song>Thinning the Herd</song>")) end @@ -39,11 +39,11 @@ end end describe "with an object" do before do - @property = Representable::XML::PropertyBinding.new(Representable::Definition.new(:song, :class => SongWithRepresenter), nil, nil) + @property = Representable::XML::PropertyBinding.new(Representable::Definition.new(:song, :class => SongWithRepresenter), nil, nil, {:doc => @doc}) end it "extracts with #read" do assert_equal @song, @property.read(Nokogiri::XML("<song><name>Thinning the Herd</name></song>")) end @@ -54,11 +54,11 @@ end end describe "with an object and :extend" do before do - @property = Representable::XML::PropertyBinding.new(Representable::Definition.new(:song, :class => Song, :extend => SongRepresenter), nil, nil) + @property = Representable::XML::PropertyBinding.new(Representable::Definition.new(:song, :class => Song, :extend => SongRepresenter), nil, nil, {:doc => @doc}) end it "extracts with #read" do assert_equal @song, @property.read(Nokogiri::XML("<song><name>Thinning the Herd</name></song>")) end @@ -88,10 +88,10 @@ end end describe "with objects" do before do - @property = Representable::XML::PropertyBinding.new(Representable::Definition.new(:song, :collection => true, :class => SongWithRepresenter), nil, nil) + @property = Representable::XML::PropertyBinding.new(Representable::Definition.new(:song, :collection => true, :class => SongWithRepresenter), nil, nil, {:doc => @doc}) end it "extracts with #read" do assert_equal @song, @property.read(Nokogiri::XML("<song><name>Thinning the Herd</name></song>")) end