Commit graph

35 commits

Author SHA1 Message Date
Prem Sichanugrist
56ca7001d4 Add support for default strategy for each ORM
DatabaseCleaner will select the best default strategy based on the ORM you're using without having you to select it by yourself.

* ActiveRecord, DataMapper => :transaction
* MongoMapper, Mongoid, CouchPotato => :truncation
2011-01-16 23:41:10 +07:00
Ben Mabey
8b94d1928d kills whitespace 2010-08-23 14:50:32 -06:00
Jon Rowe
8dcbb697b1 finish merge, all specs, all features pass 2010-06-15 15:24:50 +01:00
Ben Mabey
6e554cb2d7 Merge commit '253247bd0813dc39c9c493a80119a6403f13ee2d' into multi_orms_connections
Conflicts:
	VERSION.yml
	features/step_definitions/database_cleaner_steps.rb
	lib/database_cleaner/configuration.rb
	spec/database_cleaner/active_record/transaction_spec.rb
	spec/database_cleaner/configuration_spec.rb
	spec/database_cleaner/mongo_mapper/truncation_spec.rb

 This is merge is not yet complete.  The Mongoid strategy/specs is not completely updated
 to the new structure of the project.  Additionaly, I see quite a bit of
 duplication between Mongoid and MongoMapper.  Since they both rely on
 the same underlying mongo lib I am thinking of just having a single
 Mongo strategy.  How the default connection is inferred can use
 autodetect magic of MongoMapper and Mongoid. (Meaning, for the
     Truncation strategy the #connection method would get the connection
     from either MongoMapper or Mongoid depending on what is defined...
     or it could use what was set by the user.)
2010-06-06 15:28:22 -06:00
Ben Mabey
23031933fa updates feature error message to match new expectation of CamelCase 2010-05-30 22:57:18 -06:00
Ben Mabey
0bcd3efcd0 updates bundler and adds needed symlinks to make features run w/bundler 2010-05-30 22:37:23 -06:00
Ben Mabey
bf55f75431 removes whitespace 2010-05-30 21:12:58 -06:00
Jon Rowe
b12d4fd3c1 updated features 2010-05-30 23:08:22 +01:00
Jon Rowe
b8e30d46ea database.yml.example for testing activerecord... 2010-05-30 23:07:19 +01:00
Jon Rowe
a2b97f3a5b update steps and features into a cleaner fashion 2010-05-30 19:29:42 +01:00
Jon Rowe
b7fed145df refactor base to pass through database to strategy and let it decide to handle it, gracefully degrades (only errors upon attempt to use different database when strategy doesn't support it 2010-05-26 08:20:29 +01:00
Jon Rowe
d2da58156e Tweak features/steps for multiple orm, and fixed a bug in the couch example models 2010-05-25 18:21:45 +01:00
Jon Rowe
7ee7654c48 changed activerecord / datamapper to sqlite in order to facilitate the testing of multiple databases 2010-05-18 07:50:20 +01:00
Jon Rowe
efed6b01bf sqlite db directory and modified .gitigore 2010-05-18 07:49:24 +01:00
Jon Rowe
74575b9766 steps for multiple dbs 2010-05-17 18:06:10 +01:00
Jon Rowe
c6703f08a1 make help text slightly nicer 2010-05-17 18:05:43 +01:00
Jon Rowe
1f430a0ca3 changes to allow multiple orm features to run, pass for me, whoop whoop 2010-05-16 22:26:56 +01:00
Jon Rowe
7bf3249105 changes to models to allow Widget/AnotherWidget for multi orm testing 2010-05-16 22:26:09 +01:00
Jon Rowe
688b720591 repair features and support to all pass for cleaning single orms/dbs, so legacy works, theres also some preperation for other modes 2010-05-16 21:44:09 +01:00
Jon Rowe
27a11f1d83 cleanup active record specs 2010-05-16 21:25:05 +01:00
Jon Rowe
cfe09d618c cleanup of old example feature 2010-05-16 21:24:00 +01:00
Jon Rowe
edf0b63924 example features (to be run by the overall cleaning features) added for multiple dbs and multiple orms, can't guarentee they work yet 2010-05-16 21:22:55 +01:00
Jon Rowe
4d596928b3 change couchpotato_models for cucumber to load json_pure 2010-05-16 21:20:43 +01:00
Jon Rowe
3adc4e935a fix mongomapper_models for cucumber to load mongo_mapper 2010-05-16 20:41:14 +01:00
Jon Rowe
8da9150a1b Refactor 2010-05-04 21:07:21 +01:00
Sidney Burks
b18f9b7f57 adds mongoid support 2010-04-13 09:53:56 -06:00
Ben Mabey
e09588b15c requires mongo_mapper instead of mongomapper - MM must have changed 2010-04-13 09:48:52 -06:00
Ben Mabey
fb8431cb51 resolves breaking mongomapper feature 2010-02-18 18:37:24 -07:00
Darrin Holst
e096c35023 use jdbc for activerecord if running under jruby 2010-02-17 14:48:43 -06:00
Martin Rehfeld
efe6bfc9a7 truncation support for CouchPotato / CouchDB 2010-02-04 02:17:37 +01:00
Aubrey Holland
857c5cf93c add mongo_mapper support 2009-12-23 13:54:17 -05:00
snusnu
da7b965369 more information on how to run the examples/features alone 2009-05-07 17:36:02 +02:00
snusnu
63147b21ce basic support for transaction/truncation with datamapper 2009-05-05 17:06:02 +02:00
Ben Mabey
5e8df327d8 cucumber feature and example app done. Got the AR transaction strategy done as well. 2009-03-03 21:53:21 -07:00
Ben Mabey
13a59fc3af initial work done. Have failing example feauture and main config module done. 2009-03-01 01:45:58 -07:00