public
Rubygem
Fork of thoughtbot/shoulda
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/technicalpickles/shoulda.git
tsaleh (author)
Tue Apr 08 05:53:25 -0700 2008
commit  452b49c5f7e37906f1e73ab462605021ad123d97
tree    c3df06781f09c417a278041ff115b376a8f403de
parent  fabe6b7724b5fad0f86c6503ed5801de6ed3020f
shoulda / test
name age message
..
file README Tue Apr 08 05:53:25 -0700 2008 - removed a bunch of unneeded files under the t... [tsaleh]
directory fixtures/ Sat Jul 14 11:35:51 -0700 2007 - completely refactored the test system to use ... [tsaleh]
directory functional/ Tue Jul 24 08:33:24 -0700 2007 stuff [tsaleh]
directory other/ Sat Dec 29 06:12:36 -0800 2007 removed asset_difference, as it is now in rails... [tsaleh]
directory rails_root/ Tue Apr 08 05:53:25 -0700 2008 - removed a bunch of unneeded files under the t... [tsaleh]
file test_helper.rb Fri Aug 24 12:43:46 -0700 2007 autogenerating test plugin link [tsaleh]
directory unit/ Tue Apr 08 05:53:25 -0700 2008 - removed a bunch of unneeded files under the t... [tsaleh]
README
The Shoulda test suite (in particular - the tests that test shoulda)

Quick overview:

The test directory contains the following files and subdirectories:

* rails_root - contains the stripped down rails application that the tests run against.  The rails root contains:
** the models, controllers, and views defined under app/
** the sqlite3.rb environment file
** a migration file for each model
* fixtures - contain the sample DB data for each model
* functional - controller tests for each of the controllers under rails_root/app
* unit - model tests for each of the models under rails_root/app
* other - tests for the shoulda contexts, should statements, and assertions
* test_helper.rb - responsible for initializing the test environment
** sets the rails_env to sqlite3
** sets the rails_root
** creates the rails_root/vendor/plugins/shoulda symlink
** runs all the migrations against the in-memory sqlite3 db
** adds some magic to load the right fixture files

In order to add a new model (or controller) to the test suite:

* add that model to rails_root/app/models
* add a migration for that model
* add a fixture file
* add a test for that file under test/units

Dependencies:

* Rails gem installed in the host system
* A working sqlite3 installation.

If you have problems running these tests, please notify the mailing list:  shoulda@googlegroups.com

- Tammer Saleh <tsaleh@thoughtbot.com>