angularjs implementation with tests driven in coffeescript