richkuo / everyday_rails_rspec_rails_3_2

Sample source code for Everyday Rails Testing with RSpec (Rails 3.2.x version)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Looking for the Rails 4.0 version? Please see https://github.com/everydayrails/rspec_rails_4.

Sample Rails 3.2.x application for Everyday Rails Testing with RSpec: A Practical Approach to Test-driven Development by Aaron Sumner. This repository demonstrates incremental testing of an existing application, starting with an untested codebase and working through model, controller, and feature specs.

Each chapter's progress has a specific branch in this repository:

  • 01_untested: The initial, untested application.
  • 02_setup: Installation and configuration of the testing tools.
  • 03_models: Basics of model specs.
  • 04_factories: Use of factories to simplify test data creation.
  • 06_controllers: Basics of controller specs.
  • 07_controller_cleanup: Refactoring of controller specs.
  • 08_features: Use of Capybara in RSpec feature specs.
  • 09_speedup: Techniques of running specs more quickly.

Using Git, you can check out each version by name; for example:

git checkout 03_models

If you're not comfortable with Git, you can also use GitHub's handy branch/tag filter to select a specific tag and browse the source code online. To learn more about Git, I recommend Git Immersion.

About

Sample source code for Everyday Rails Testing with RSpec (Rails 3.2.x version)

License:MIT License