boone / shoulda forked from thoughtbot/shoulda
- Source
- Commits
- Network (93)
- Issues (0)
- Downloads (2)
- Wiki (1)
- Graphs
-
Tree:
7e96fc5
commit 7e96fc577e3ef8bcce0d2b16d657e46acec092b6
tree c1f86cda2ad2a98161ff9b7ca6d89cdfa5734f01
parent fa21ea937436aa2f02fcea830da218616b149d59
tree c1f86cda2ad2a98161ff9b7ca6d89cdfa5734f01
parent fa21ea937436aa2f02fcea830da218616b149d59
shoulda / test
| name | age | message | |
|---|---|---|---|
| .. | |||
| |
README | ||
| |
fixtures/ | ||
| |
functional/ | ||
| |
other/ | ||
| |
rails_root/ | ||
| |
test_helper.rb | ||
| |
unit/ |
test/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>

