You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Alinson S. Xavier dcfc38eb09
Organizando plugins e gems.
16 years ago
..
fixtures Organizando plugins e gems. 16 years ago
functional Organizando plugins e gems. 16 years ago
matchers Organizando plugins e gems. 16 years ago
other Organizando plugins e gems. 16 years ago
rails_root Organizando plugins e gems. 16 years ago
unit Organizando plugins e gems. 16 years ago
README Organizando plugins e gems. 16 years ago
fail_macros.rb Organizando plugins e gems. 16 years ago
model_builder.rb Organizando plugins e gems. 16 years ago
rspec_test.rb Organizando plugins e gems. 16 years ago
test_helper.rb Organizando plugins e gems. 16 years ago

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 test.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 test
** 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>