mikeantonelli / jasmine-and-teaspoon

Learn Javascript Testing in Ruby on Rails with Teaspoon and Jasmine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
  • npm installed
  $ 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

About

Learn Javascript Testing in Ruby on Rails with Teaspoon and Jasmine


Languages

Language:Ruby 71.3%Language:JavaScript 13.7%Language:HTML 12.4%Language:CSS 2.5%