Sha256: 1c2cec4ad7bb37a6fa3e570818fc468a29c3cb0c06ab1e423e278832dc8263b3

Contents?: true

Size: 1.41 KB

Versions: 51

Compression:

Stored size: 1.41 KB

Contents

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>

Version data entries

51 entries across 51 versions & 12 rubygems

Version Path
emschwar-shoulda-2.0.6.1 test/README
francois-shoulda-2.0.5.1 test/README
francois-shoulda-2.0.5.2 test/README
francois-shoulda-2.0.5.4 test/README
gsterndale-warrant-0.2.0 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.6/test/README
gsterndale-warrant-0.3.0 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.6/test/README
hashrocket-clearance-0.4.0 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.4/test/README
hashrocket-clearance-0.4.1 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.4/test/README
hashrocket-clearance-0.4.2 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.4/test/README
hashrocket-clearance-0.4.3 test/rails_root/vendor/gems/thoughtbot-shoulda-2.0.4/test/README
mattknox-goaloc-0.3.0 lib/goaloc/generators/resources/shoulda/test/README
mattknox-goaloc-0.4.0 lib/goaloc/generators/resources/shoulda/test/README
mjankowski-shoulda-2.0.4 test/README
mjankowski-shoulda-2.0.5 test/README
ratnikov-shoulda-2.0.6.1 test/README
ratnikov-shoulda-2.0.6.2 test/README
ratnikov-shoulda-2.0.6.3 test/README
rmm5t-shoulda-2.0.2 test/README
rmm5t-shoulda-2.0.5 test/README
rmm5t-shoulda-2.0.6 test/README