In a recent project, I experimented with AngularJS on
Rails, and managed to get Karma to work nicely with Jenkins on
CloudBees. This post documents the steps I took. (Part 2
will cover e2e tests, if I get that sorted out.)

If you expect to use mocks in your unit tests, install angular-mocks.js at
spec/javascripts/lib/angular/angular-mocks.js.

Finally, create a karma configuration file with the following gist

I am not perfectly satisfied with this solution, since it requires the developer to
manually synchronize karma.conf.js with application.js. Please let me know
in the comments if you figure out a better way.