test/model.rb in ohm-1.0.0.alpha1 vs test/model.rb in ohm-1.0.0.alpha2

- old
+ new

@@ -450,9 +450,21 @@ assert [@person1] == @event.attendees.find(:initial => "A").to_a assert [@person2] == @event.attendees.find(:initial => "B").to_a assert [] == @event.attendees.find(:initial => "Z").to_a end +test "delete elements" do + @event.save + @event.attendees.add(@person1) + @event.attendees.add(@person2) + + assert_equal 2, @event.attendees.size + + @event.attendees.delete(@person2) + assert_equal 1, @event.attendees.size +end + + test "not be available if the model is new" do assert_raise Ohm::MissingID do @event.attendees end end