This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
README
==Introduction Ruby On Rails plugin to use helper modules in testing (Test::Unit). This is especially useful when you have factory methods or utility methods in your test code that you'd like to be able to share between multiple test files (and you don't want to clutter your test_helper.rb). This plugin is just an extension of http://faithfulcode.rubyforge.org/svn/plugins/trunk/test_helpers/ with modifications for my own tastes and a generator for easy addition of test helpers. Author: Brian Smith (bsmith@swig505.com) Date: December 2007 ==Overview The built in testing framework for Ruby On Rails (Test::Unit) does not use helper modules for testing. This plugin allows you to create a directory ('test/helpers') and place helper modules in the directory. You can create a helper module with the following command (that will create a file <tt>test/helpers/<name>_test_helper.rb</tt>). script/generate test_helper <name> Each helper module can be loaded with: test_helper :<name> Additionally, you could place the following within test_helper.rb to automatically load all test helper modules: test_helpers :all NOTE: <tt>test_helper</tt> and <tt>test_helpers</tt> are aliases ==Example If you had a unit test file called "user_test.rb" in test/units, you could create the file "test/helpers/user_test_helper.rb" with the following: ruby script/generate test_helper user The "test/helpers/user_test_helper.rb" file that is created will contain the following: <tt> module UserTestHelper end </tt> Then, within "test/unit/user_test.rb", you would place the following: test_helper :user








