Permalink
Browse files

No commit message

  • Loading branch information...
1 parent 2f6e75b commit dcdd2eb6700e7d2c48a938cab0ead52ef3d2977d anoiaque committed Jan 24, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 README.rdoc
View
@@ -1,17 +1,18 @@
== Overview
-*Factory Boy aims to avoid slow unit tests due to usage of create/find fixtures in database, with factory_girl for example.
+Factory Boy aims to avoid slow unit tests due to usage of create/find fixtures in database, with factory_girl for example.
-*Factory Boy can be used as factory_girl except that factories are not created in database.
+Factory Boy can be used as factory_girl except that factories are not created in database.
-*ActiveRecord::Base finders are stubbed to return fixtures (plants) you have instanciated.
+ActiveRecord::Base finders are stubbed to return fixtures (plants) you have instanciated.
Now, Factory Boy 2 handle stub of Active Record (3+) queries.
This means, the fixtures(plants) created with factory boy are retrieved via a AR queries(and only with AR new queries) of your models.
+
It does not pretend to stub 100% of all queries, but the coverage can be estimated at about 80%-90% of useful queries.
-Active Record is stubbed only when at least one Plant is created in a test.
+Active Record is stubbed only when at least one Plant is created in a test.\n
After each test everything is unstubbed.
That means, if you have a case where a particular(complex) query is executed but not right stubbed with factory boy you can test using fixtures in databases(with factory girl or just model.create ..), skipping factory boy process.

0 comments on commit dcdd2eb

Please sign in to comment.