From 501025b9dea4bfa7a03b937eb959dd9c9c5aea95 Mon Sep 17 00:00:00 2001 From: Ben Mabey Date: Mon, 19 Dec 2011 20:42:34 -0700 Subject: [PATCH] updates README to include new sequel adapter info --- README.textile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.textile b/README.textile index a007c90..5271dfe 100644 --- a/README.textile +++ b/README.textile @@ -5,7 +5,7 @@ The original use case was to ensure a clean state during tests. Each strategy is a small amount of code but is code that is usually needed in any ruby app that is testing with a database. -ActiveRecord, DataMapper, MongoMapper, Mongoid, and CouchPotato are supported. +ActiveRecord, DataMapper, Sequel, MongoMapper, Mongoid, and CouchPotato are supported. Here is an overview of the strategies supported for each library: @@ -14,15 +14,16 @@ Here is an overview of the strategies supported for each library: | DataMapper | Yes | **Yes** | No | | CouchPotato | **Yes** | No | No | | MongoMapper | **Yes** | No | No | -| Mongoid | **Yes** | No | No | +| Sequel | **Yes** | Yes | No | (Default strategy for each library is denoted in bold) -The ActiveRecord @:deletion@ strategy is only useful for when the @:truncation@ strategy causes -locks (as reported by some Oracle DB users). The @:truncation@ strategy is the preferred option -since it is much faster. +The ActiveRecord @:deletion@ strategy is useful for when the @:truncation@ strategy causes +locks (as reported by some Oracle DB users). The @:deletion@ option has been reported to +be faster than @:truncation@ in some cases as well. In general, the best approach is to use +@:transaction@ since it is the fastest. -Database Cleaner also includes a @null@ strategy (that does no cleaning at all) which can be used +Database Cleaner also includes a @null@ strategy (that does no cleaning at all) which can be used with any ORM library. You can also explicitly use it by setting your strategy to @nil@. h2. How to use @@ -119,7 +120,7 @@ After do |scenario| end -This should cover the basics of tear down between scenarios and keeping your database clean. +This should cover the basics of tear down between scenarios and keeping your database clean. For more examples see the section "Why?" h2. Common Errors @@ -145,7 +146,7 @@ Sometimes you need to use multiple ORMs in your application. You can use Databas #How to specify particular orms DatabaseCleaner[:active_record].strategy = :transaction DatabaseCleaner[:mongo_mapper].strategy = :truncation - + #How to specify particular connections DatabaseCleaner[:active_record,{:connection => :two}] @@ -161,6 +162,7 @@ Configuration options | Mongo Mapper | DatabaseCleaner[:mongo_mapper] | Multiple connections not yet supported | | Mongoid | DatabaseCleaner[:mongoid] | Multiple connections not yet supported | | Couch Potato | DatabaseCleaner[:couch_potato] | Multiple connections not yet supported | +| Sequel | DatabaseCleaner[:sequel] | ? | h2. Why?