This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# COMMUNITY CHALLENGE | |
# | |
# How would you test this Quiz#problem method? Only two rules: | |
# | |
# 1. You must test the order the gets/puts happen. The tests should not | |
# still pass if "gets" happens before "puts", etc. | |
# | |
# 2. No changing the Quiz class implementation/structure. But you can | |
# use whatever framework you want for the tests. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.observe("dom:loaded", function() { | |
function updateElementsWithTime() { | |
$$("span[time]").invoke('updateTime') | |
} | |
// update immediately | |
updateElementsWithTime() | |
// continue updating every 2 minutes | |
new PeriodicalExecuter(updateElementsWithTime, 60 * 2) | |
}) |
NewerOlder