These are the examples from the RMR JS workshop. Beware of branches described below.
- All the code with jasmine specs is on master.
- The intro-specs branch has our version of the KVStore with tests while master has the solution we came up with in the workshop.
- The rails sample app with jasmine-gem set up is also on master.
- The branch teaspoon-specs contains the rails app with teaspoon set up for javascript testing.
- The working examples for ajax testing are in the store and storeSpec files.
All the tests are written using jasmine.
- The jasmine testing framework comes with its own runner, it's the specRunner.html file.
- There is a gem version.
- The specs in the rails app can be run with
rake jasmine. Which shows the specRunner screen at http://localhost:8888/ - Running
rake jasmine:ciruns it on the comand line and reports there. - We've also included jasmine-ajax for simple ajax testing.
- We installed teaspoon as another example of a spec runner. It has support for multiple frameworks including mocha and jasmine out of the box. It also plays nicely with require.js.
- The jasmine specs can be run in the teaspoon runner via
teaspoon. - Or, when the rails server is running they can be accessed via '/teaspoon'
The todo-app example comes from todmvc.com. Specifically from here.
Copyright (c) 2013 Georg Apitz and Zac Clark. This software is licensed under the MIT License.