README.rdoc in test-belt-0.1.1 vs README.rdoc in test-belt-0.1.2

- old
+ new

@@ -25,13 +25,13 @@ gem 'test-belt' # other testing gem dependencies ... end -== Test Helper -Using the TestBelt test helper loads in the testing libraries I like and use. In your test files or a common test helper file, require in the helper: - require 'test_belt/helper' +== Test Helpers +Requiring test belt loads in the testing libraries I like and use. In your test files or a common test helper file, require in test belt: + require 'test_belt' This will give you the following tools. I use most of these helpers in testing this gem. To see examples of these in action, peruse this gem's test files (https://github.com/kelredd/test-belt/tree/master/test) and run the test suite with: $ rake test === Test::Unit @@ -62,19 +62,28 @@ * setup_once / before_once - runs one time before any of the tests in the test case are run * teardown_once / after_once - runs one time after all of the tests in the test case are run * suite_started / on_suite_started - runs one time before any of the tests across the entire test suite are run * suite_finished / on_suite_finished - runs one time after all of the tests across the entire test suite are run -== Rake tasks for running tests +== Generated Rake tasks +=== For running tests TestBelt can provide an automatic set of rake tasks for testing subsets of your code base. These tasks are defined based on the structure of your test files. To use this first add this to your Rakefile: require 'rubygems' require 'test_belt/rake_tasks' TestBelt::RakeTasks.for :test # this assumes your test files are located in /test To see what this gives you: $ rake -T + +=== IRB with your environment loaded +Many times in developing code, I need to quickly load up IRB with my environment. TestBelt will give you a rake task for doing that. Simply create an env.rb file that loads your environment in your test file directory (/test for example). See https://github.com/kelredd/test-belt/tree/master/test/env.rb and demo for this gem with: + + $ rake irb + > TestBelt + => TestBelt + > == License Copyright (c) 2010 Kelly D. Redding