Getting started with Jasmine
18 Dec 2012
Today's post will be short and sweet because getting started with Jasmine is really that easy.
If you have worked with Rspec before, you will feel right at home with jasmine. A lot of the function names have been repeated and a lot of the matchers will leave you feeling pretty comfortable as well.
So, once you start creating your own files, you will want to point the cool little runner to them. To do this you can open up the SpecRunner.html. Inside that file, you will find unmissable comments that say "include source files here and include spec files here". Do that. You can also remove the example ones if you want. Then you can start writing code! It really is that easy. You can look at the example files that they include with the download if you want to see a template of an actual project.
In your spec, you will start with a describe function (much like rspec) and then you can write your tests. When you want to run your specs, you can go ahead and open the SpecRunner.html in a browser.