designcreateplay/NodeBB — pull request #506 by deniswolf (2013-11-17 22:07:39+00:00)
Title: Cleanup specs in test/topic.js

Hey guys,

I have refactored this amazing new spec ^_^

1. Data is re-initialized now before every check. So if it was corrupted somehow on the way - it should get back clean.
2. I have changed some description texts to be readable as a sentence.
3. Mocha's `done` accepts first parameter as error, so I refactored calls for it as shortcut. It's not obvious for reader for the first time that done.apply(argument) does anyway - so passing function as callback should make him do the same - google `mocha` and check ^^''

Let me know if you don't like the style - but if you do - I would be happy to talk to you about TDD/BDD.
I have several years of extensive experience in it behind) - it would be cool if my knowledge could help you with cleaner specs (tho I agree with the fact that everyone has special view on them :D )