thoughtbot--shoulda-matchers/test
Tammer Saleh 9a43008886 Revert the removal of should_be_restful.
This reverts commits 10303b28f3,
f018d08444 and
66eaccf98c, which collectively removed
should_be_restful.  We need to deprecate should_be_restful for a good while
before we actually remove it from the codebase.

This also reverts the gem version back to 2.0.0.  We'll see if github has a
problem with that.
2008-09-20 22:08:45 -04:00
..
fixtures Fixed should_have_many regression [#60] 2008-08-31 12:14:16 -04:00
functional Revert the removal of should_be_restful. 2008-09-20 22:08:45 -04:00
other Fixed a typo that resulted in a test that would always pass 2008-09-04 16:07:43 -04:00
rails_root should_have_one macro now supports the :dependent option 2008-09-17 12:32:44 -07:00
unit Better named the should clause for should_have_one when the :dependent option is in use [#81] 2008-09-17 16:16:41 -04:00
README Rid the symlink behavior under test/rails_root/vendor/plugins 2008-07-11 21:03:50 -04:00
fail_macros.rb Added a `should_fail` macro to help test failure scenarios in the core shoulda tests 2008-09-14 21:19:44 -04:00
test_helper.rb Added a `should_fail` macro to help test failure scenarios in the core shoulda tests 2008-09-14 21:19:44 -04: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
** a shoulda initializer that simulates loading the plugin but without relying on vendor/plugins
* 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
** 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>