Learn Jasmine and Teaspoon
This project will take you from project setup to writing tests for your Ruby on Rails applications and engines using jasmine and teaspoon.
Machine Setup
This project assumes the following:
- RVM installed
- Homebrew installed
- Phantom-JS installed
$ brew install phantomjs
- npm installed
$ brew install npm
- Istanbul installed
$ npm install -g istanbul
Get Started
Clone this repo
$ git clone <repo> && cd jasmine-and-teaspoon
Lessons
1. Project Setup
Install and configure teaspoon and jasmine.
git checkout 1-project-setup
Rails Application
Rails Engine
2. Write some tests
git checkout 2-write-some-tests
reachability.js
3. Test event dispatching
git checkout 3-dispatching-events
reachability.js
4. Testing ajax calls
git checkout 4-ajax
reachability.js
5. Coverage lies
git checkout 5-coverage-lies