barista
barista copied to clipboard
Manual .coffee files compiling
I'm using Jasmine, a javascript test framework and would like to be able to write tests in CoffeeScript. Jasmine puts its files under spec/javascripts
, thus I want to be able to put my .coffee files containing tests under spec/coffeescripts
and then compile them to spec/javascripts
each time I run the testsuite.
One option I was pointed to is to use a guard-coffeescript gem, but I dislike the idea of something being constantly loaded in the background (if I forget to load it, then my compiled js tests won't be up to date with the .coffee tests). So, what I would like to do is to be able to compile those .coffee files each time I run rake jasmine:ci
. That would probably mean putting some calls to Barista compiler in spec/javascripts/support/jasmine_runner.rb
and I would like to know what that code would actually look like? Thanks.