A simple project
Clone this wiki locally
To use Jasmine with a simple project, download the standalone distribution for the desired version of Jasmine from this list. Edit the SpecRunner.html file (located in the root of your jasmine standalone download):
- add your source files as separate
<script>tags before the Jasmine files to the head element
- add your spec files as separate
<script>tags after the Jasmine files to the head element
- All paths pointing to lib/jasmine-jasmine-1.1.0.rc1, if any, should point to the parent directory. E.g.: lib/jasmine-1.1.0.rc1/jasmine.js should point to ../jasmine.js
Point your favorite browser to the
SpecRunner.html file and reload to run your specs.
As you add new files to your project, make sure to add source and spec
If you get tired of managing your files manually check out how to use Jasmine in A ruby project (with or without rails) (or a project that doesn't mind having Ruby around).