Skip to content

Commit

Permalink
Corrected README, factories are declared by reopening Cranky::Factory
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginty committed Aug 23, 2010
1 parent 198dd8f commit 17f31c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Cranky has a nice debug option (rails only) to warn you when your factory is bro
Cranky allows you to build factories via std Ruby methods, like this...

# factories/my_factories.rb
class Cranky::Factory # Your factory must extend Cranky::Factory
class Cranky::Factory # Your factory must reopen Cranky::Factory

# Simple factory method to create a user instance, you would call this via Factory.build(:user)
def user
Expand Down Expand Up @@ -89,7 +89,7 @@ This is where Cranky really shines, if you can create Ruby methods you can prett

The only rules are:

1. Your factory must extend the Cranky::Factory class
1. Your factory must reopen the Cranky::Factory class
2. Your factory method must return the object you wanted to create
3. You can access the overrides passed in via options[:key] (not really a rule!)

Expand Down

0 comments on commit 17f31c1

Please sign in to comment.