thoughtbot--shoulda-matchers/test
Tammer Saleh b415bff884 Revert bunch of bad commits:
2442d1f608
35213b5a1b
804f859435
fc938bb185

Getting the following error when running tests in a real project:

  ...activesupport/lib/active_support/dependencies.rb:276:in `load_missing_constant': uninitialized constant Shoulda::ActiveRecord::Base (NameError)

Think this is because of the namespace changes, but not sure.  Will investigate later.
2008-06-23 12:36:31 -04:00
..
fixtures Scoping of uniqueness validations on multiple attributes 2008-05-29 16:48:39 -07:00
functional stuff 2007-07-24 15:33:24 +00:00
other Revert bunch of bad commits: 2008-06-23 12:36:31 -04:00
rails_root Merge git://github.com/nate/shoulda into pull-requests 2008-06-07 11:05:03 -04:00
unit Merge git://github.com/nate/shoulda into pull-requests 2008-06-07 11:05:03 -04:00
README - removed a bunch of unneeded files under the test/rails_root 2008-04-08 12:53:25 +00:00
test_helper.rb autogenerating test plugin link 2007-08-24 19:43:46 +00:00

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>