Displaying 1 result from an estimated 1 matches for "test_pushing_twice".
2005 Mar 13
1
Semantics of push_with_attributes
In trying to add timestamp support to habtm, I''ve stumped on a question
which I hope you all help me solve.
And that is, when adding a record twice to the list of associations with
push with attributes, should the following test succeed or not?
def test_pushing_twice
dev = Devel.new("name"=>"victor")
p = Project.new("name"=>"whatever")
dev.projects.push_with_attributes(p, :joined_on => Date.today)
dev.projects.push_with_attributes(p, :joined_on => Date.today)
assert_equal(1,dev.projects.size)
en...