- assert_equal OldNode.find(:all, :conditions => [ "id = ?", node_template.id ]).length, 2
- assert_equal OldNode.find(:all, :conditions => [ "id = ? and timestamp = ?", node_template.id, node_template.timestamp ]).length, 1
- old_node = OldNode.find(:first, :conditions => [ "id = ? and timestamp = ?", node_template.id, node_template.timestamp ])
+ assert_equal OldNode.where(:node_id => node_template.id).count, 2
+ old_node = OldNode.where(:node_id => node_template.id, :version => 2).first