Plugin Test =========== A generator for testing database-powered plugins. Based on work by Scott Barron in the acts_as_state_machine plugin. http://lunchroom.lunchboxsoftware.com/articles/2006/01/21/acts-as-state-machine == Usage Apply it to an existing Rails plugin. ./script/generate plugin_test ar_fixtures Require the test helper by adding this to your test file: require File.expand_path(File.dirname(__FILE__) + "/test_helper") Edit schema.rb with a migration to build your tables. Now you can use fixtures and database models as they are used in a regular Rails unit test. SQLite3 is set as the default but other databases can be specified in the test_helper.rb. See an example in the tests for my AR Fixtures plugin: http://topfunky.net/svn/plugins/ar_fixtures/ == Author Most of the original code was by Scott Barron. Converted to a plugin by Geoffrey Grosenbach. http://nubyonrails.com