I’ve been working with Middleman for a few days and am loving it. Today I thought I’d try to write some tests for a bit of Coffeescript using Jasmine … and ran into a pretty major block. I’m using the jasmine-middleman
gem but, for some reason, I’m getting the following error when loading up the Jasmine spec runner page:
Uncaught ReferenceError: $ is not defined
I know it’s loading my code because it’s my code throwing that error. I’m led to believe that jQuery is not being included but I’m not sure how to get that working. I’ve tried using the jasmine-jquery
library but nothing changed.
Does anyone have any ideas on what I can try next? I’m at a total loss and am not quite sure how to move forward.
To be clear, I would like to write my tests in Coffeescript and have my Coffeescript source files be tested. I am unsure if this is even possible so I could be barking up a tree that doesn’t exist (wouldn’t be the first time).
You can check out the code I’m referencing in the repository.