Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginty committed Aug 22, 2010
1 parent 4572253 commit 198dd8f
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 @@ -235,8 +235,8 @@ Clear all instance variables in the factory. This may be useful to run between t

Sometimes it is useful to be warned that your factory is generating invalid instances (although quite often your tests may intentionally generate invalid instances, so use this with care). By turning on debug the Factory will raise an error if the generated instance is invalid...

Factory.debug(:user)
Factory.debug!(:user)
Factory.debug(:user) # A replacement for Factory.build, with validation warnings enabled
Factory.debug!(:user) # Likewise for Factory.create

Note that this relies on the instance having a valid? method, so in practice this may only work with Rails.

Expand Down

0 comments on commit 198dd8f

Please sign in to comment.