-
Notifications
You must be signed in to change notification settings - Fork 14
Rails Usage
canadaduane edited this page Sep 14, 2010
·
11 revisions
See the Special Directives for a full explanation of the
doctest_require:directive. To get started quickly in rails, this is probably the directive you will want to use in order to load the environment.rb file before the file gets loaded.
# doctest_require: "../../config/environment"
By putting the above line before anything in your file (say, app/model/book.rb) you will have DocTest load the Rails environment before it runs the tests in your documentation.