test/twin/twin_test.rb in disposable-0.1.13 vs test/twin/twin_test.rb in disposable-0.1.14

- old
+ new

@@ -72,9 +72,20 @@ # DOES NOT update model song.id.must_equal 1 song.title.must_equal "Broken" end + describe "deleting" do + it "allows overwriting nested twin with nil" do + album = Model::Album.new(1, "Uncertain Terms", [], artist=Model::Artist.new("Greg Howe")) + twin = Twin::Album.new(album) + twin.artist.id.must_equal "Greg Howe" + + twin.artist = nil + twin.artist.must_equal nil + end + end + # setters for twin properties return the twin, not the model # it do # result = twin.album = album # result.must_equal twin.album # end \ No newline at end of file