Permalink
Browse files

fixing prepare script and adding instruction to run it in readme

  • Loading branch information...
1 parent dbfa699 commit 936e507c635ac3b0919e1c54a411ad194c8e99b7 @ryanb committed Jun 26, 2008
Showing with 20 additions and 3 deletions.
  1. +19 −2 README
  2. +1 −1 spec/prepare.rb
View
21 README
@@ -18,13 +18,18 @@ Rails 2.1 or later required.
== Usage
-This gem adds the scope_builder method to all Active Record models. A builder behaves exactly like any other named scope except that calling other named scopes on it will alter the builder itself rather than returning a new named scope.
+This gem adds the scope_builder method to all Active Record models. A
+builder behaves exactly like any other named scope except that calling
+other named scopes on it will alter the builder itself rather than
+returning a new named scope.
builder = Product.scope_builder
builder.released.visible # call a couple named scopes to change builder
builder.cheap if only_show_cheap_products? # build scopes conditionally
-The scope_builder method can also take a block which will return the builder. This is useful when you are using the builder in a model search method.
+The scope_builder method can also take a block which will return the
+builder. This is useful when you are using the builder in a model
+search method.
# in product model
def self.search(options)
@@ -35,6 +40,18 @@ The scope_builder method can also take a block which will return the builder. Th
end
+== Running Tests
+
+To run the tests (specs), you first need to run the spec/prepare.rb
+script.
+
+ ruby spec/prepare.rb
+
+Then you can run rake spec or autotest
+
+ rake spec
+
+
== Development
This project can be found on github at the following URL.
View
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.dirname(__FILE__) + '/spec_helper'
# define a migration
class CreateTasks < ActiveRecord::Migration

0 comments on commit 936e507

Please sign in to comment.