mikeantonelli / jasmine-and-teaspoon

Learn Javascript Testing in Ruby on Rails with Teaspoon and Jasmine
1 stars 1 forks source link

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:

  $ brew install phantomjs
  $ brew install npm
  $ 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

reachability.js