Very weird behavior with event tests

0 views
Skip to first unread message

Nicolás Sanguinetti

unread,
Dec 17, 2007, 9:32:35 PM12/17/07
to prototy...@googlegroups.com
I was trying to figure out the problem of a poster in the spinoffs
list (http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/4ff06bf903aced80)
about Event.observe throwing errors with the element. I saw the code,
it was using Event.observe(unextended_node, ...), so I figured to add
a test for Event.fire and Event.observe receiving unextended nodes.

http://pastie.caboo.se/129854

For what I can gather, the observer method in that test is being
called 9 times (console.log in the observer). So that "explains" the 8
failures and still showing up green. I added the console.log in the
first test ("testCustomEventFiring") and it only calls it once, so it
seems there's some poblem when extending the nodes, but after digging
a bit through the source I couldn't find it, and the event handling
was never the part of the source I grokked the most, so ... I'll keep
looking for the problem, but maybe someone else can find it faster :)

Best
-Nicolas

Reply all
Reply to author
Forward
0 new messages