acdesouza / rack_tested_by_capybara

Study rack app tested using capybara

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing Rack app using Capybara

Build Status

How to create a Rack app and test it using a headless Capybara.

Description

This application shows a welcome page and change its title, throught JavaScript.

Download project:

git clone
cd rack_test_by_capybara
bundle install

To see it working:

rackup # See it at http://localhost:9292

To see the tests running:

rake test # Or, just rake, since test is the default task.

Requirements

OSX

$ brew install phantomjs

Sources

Todo

  • Config a rake task to test a Rack app
  • Create firts test for 200 with a h1 saying "It works!"
  • Create a rack app which answer 200, "It works!"
  • Create test for 404 when acessing any other path
  • Change RackApp to answer 404 when not accessing "/"
  • Create a test to check greeting message on "/welcome"
  • Add Rack server pages to show pages based on url
  • Create a test to check JavaScript's greeting message, using Poltergeist
  • Add JavaScript greeting message
  • Run it on Travis

About

Study rack app tested using capybara


Languages

Language:Ruby 90.9%Language:JavaScript 4.2%Language:HTML 3.0%Language:CSS 1.9%