# app/assets/javascripts/myapp/controllers.js.coffee (replaces the js version) app = angular.module 'myapp', [] app.controller "PostListCtrl", ($scope) -> $scope.posts = [ { "title": "My First Post", "intro": "Subtitle of my post" }, { "title": "Another Post", "intro": "Something interesting about this post" }, { "title": "One More Thng", "intro": "There's always something more" } ] # note how i defined the controller function to get it to work. It runs in the browser. # but the test reports # ReferenceError: PostListCtrl is not defined in http://localhost:3000/assets/controllers_spec.js?body=1 (line 8) # how do i get the tests to find it?