add when_changed when_failed examples to docsite

whitespace fix
Merge pull request #1881 from fdavis/when_changed_fail

add when_changed when_failed example to docsite