database_cleaner 0.8.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/Gemfile.lock +150 -82
  2. data/History.txt +19 -1
  3. data/README.textile +61 -59
  4. data/Rakefile +7 -17
  5. data/VERSION.yml +3 -3
  6. data/examples/Gemfile +14 -20
  7. data/examples/Gemfile.lock +150 -82
  8. data/examples/features/step_definitions/translation_steps.rb +14 -14
  9. data/examples/features/support/env.rb +6 -2
  10. data/features/cleaning.feature +1 -1
  11. data/features/cleaning_default_strategy.feature +1 -1
  12. data/features/cleaning_multiple_dbs.feature +1 -2
  13. data/features/cleaning_multiple_orms.feature +7 -7
  14. data/features/support/env.rb +1 -1
  15. data/lib/database_cleaner/active_record/base.rb +26 -6
  16. data/lib/database_cleaner/active_record/deletion.rb +2 -2
  17. data/lib/database_cleaner/active_record/transaction.rb +9 -9
  18. data/lib/database_cleaner/active_record/truncation.rb +157 -50
  19. data/lib/database_cleaner/base.rb +2 -2
  20. data/lib/database_cleaner/configuration.rb +26 -3
  21. data/lib/database_cleaner/data_mapper/truncation.rb +2 -2
  22. data/lib/database_cleaner/generic/truncation.rb +7 -5
  23. data/lib/database_cleaner/mongo/base.rb +16 -0
  24. data/lib/database_cleaner/mongo/truncation.rb +9 -14
  25. data/lib/database_cleaner/mongo/truncation_mixin.rb +22 -0
  26. data/lib/database_cleaner/mongo_mapper/truncation.rb +2 -2
  27. data/lib/database_cleaner/mongoid/truncation.rb +2 -2
  28. data/lib/database_cleaner/moped/truncation.rb +6 -2
  29. data/lib/database_cleaner/sequel/truncation.rb +6 -6
  30. data/spec/database_cleaner/active_record/base_spec.rb +27 -15
  31. data/spec/database_cleaner/active_record/truncation/mysql2_spec.rb +40 -0
  32. data/spec/database_cleaner/active_record/truncation/mysql_spec.rb +40 -0
  33. data/spec/database_cleaner/active_record/truncation/postgresql_spec.rb +48 -0
  34. data/spec/database_cleaner/active_record/truncation/shared_fast_truncation.rb +40 -0
  35. data/spec/database_cleaner/active_record/truncation_spec.rb +102 -33
  36. data/spec/database_cleaner/base_spec.rb +14 -14
  37. data/spec/database_cleaner/configuration_spec.rb +15 -10
  38. data/spec/database_cleaner/data_mapper/base_spec.rb +1 -1
  39. data/spec/database_cleaner/data_mapper/transaction_spec.rb +1 -1
  40. data/spec/database_cleaner/data_mapper/truncation_spec.rb +1 -1
  41. data/spec/database_cleaner/generic/base_spec.rb +1 -1
  42. data/spec/database_cleaner/generic/truncation_spec.rb +35 -5
  43. data/spec/database_cleaner/mongo/mongo_examples.rb +26 -0
  44. data/spec/database_cleaner/mongo/truncation_spec.rb +72 -0
  45. data/spec/database_cleaner/mongo_mapper/base_spec.rb +1 -1
  46. data/spec/database_cleaner/sequel/base_spec.rb +1 -1
  47. data/spec/database_cleaner/sequel/transaction_spec.rb +1 -1
  48. data/spec/database_cleaner/sequel/truncation_spec.rb +1 -1
  49. data/spec/database_cleaner/{shared_strategy_spec.rb → shared_strategy.rb} +0 -0
  50. data/spec/spec_helper.rb +6 -4
  51. data/spec/support/active_record/database_setup.rb +4 -0
  52. data/spec/support/active_record/mysql2_setup.rb +38 -0
  53. data/spec/support/active_record/mysql_setup.rb +38 -0
  54. data/spec/support/active_record/postgresql_setup.rb +41 -0
  55. data/spec/support/active_record/schema_setup.rb +10 -0
  56. metadata +313 -46
  57. data/spec/spec.opts +0 -7
@@ -0,0 +1,26 @@
1
+ module MongoTest
2
+ class ThingBase
3
+ def self.collection
4
+ @connection ||= ::Mongo::Connection.new('127.0.0.1')
5
+ @db ||= @connection.db('database_cleaner_specs')
6
+ @mongo ||= @db.collection(name) || @db.create_collection(name)
7
+ end
8
+
9
+ def self.count
10
+ @mongo.count
11
+ end
12
+
13
+ def initialize(attrs={})
14
+ @attrs = attrs
15
+ end
16
+
17
+ def save!
18
+ self.class.collection.insert(@attrs)
19
+ end
20
+ end
21
+
22
+ class Widget < ThingBase
23
+ end
24
+ class Gadget < ThingBase
25
+ end
26
+ end
@@ -0,0 +1,72 @@
1
+ require File.dirname(__FILE__) + '/../../spec_helper'
2
+ require 'mongo'
3
+ require 'database_cleaner/mongo/truncation'
4
+ require File.dirname(__FILE__) + '/mongo_examples'
5
+
6
+ module DatabaseCleaner
7
+ module Mongo
8
+
9
+ describe Truncation do
10
+ let(:args) {{}}
11
+ let(:truncation) { described_class.new(args).tap { |t| t.db=@db } }
12
+ #doing this in the file root breaks autospec, doing it before(:all) just fails the specs
13
+ before(:all) do
14
+ @connection = ::Mongo::Connection.new('127.0.0.1')
15
+ @test_db = 'database_cleaner_specs'
16
+ @db = @connection.db(@test_db)
17
+ end
18
+
19
+ after(:each) do
20
+ @connection.drop_database(@test_db)
21
+ end
22
+
23
+ def ensure_counts(expected_counts)
24
+ # I had to add this sanity_check garbage because I was getting non-determinisc results from mongo at times..
25
+ # very odd and disconcerting...
26
+ expected_counts.each do |model_class, expected_count|
27
+ model_class.count.should equal(expected_count), "#{model_class} expected to have a count of #{expected_count} but was #{model_class.count}"
28
+ end
29
+ end
30
+
31
+ def create_widget(attrs={})
32
+ MongoTest::Widget.new({:name => 'some widget'}.merge(attrs)).save!
33
+ end
34
+
35
+ def create_gadget(attrs={})
36
+ MongoTest::Gadget.new({:name => 'some gadget'}.merge(attrs)).save!
37
+ end
38
+
39
+ it "truncates all collections by default" do
40
+ create_widget
41
+ create_gadget
42
+ ensure_counts(MongoTest::Widget => 1, MongoTest::Gadget => 1)
43
+ truncation.clean
44
+ ensure_counts(MongoTest::Widget => 0, MongoTest::Gadget => 0)
45
+ end
46
+
47
+ context "when collections are provided to the :only option" do
48
+ let(:args) {{:only => ['MongoTest::Widget']}}
49
+ it "only truncates the specified collections" do
50
+ create_widget
51
+ create_gadget
52
+ ensure_counts(MongoTest::Widget => 1, MongoTest::Gadget => 1)
53
+ truncation.clean
54
+ ensure_counts(MongoTest::Widget => 0, MongoTest::Gadget => 1)
55
+ end
56
+ end
57
+
58
+ context "when collections are provided to the :except option" do
59
+ let(:args) {{:except => ['MongoTest::Widget']}}
60
+ it "truncates all but the specified collections" do
61
+ create_widget
62
+ create_gadget
63
+ ensure_counts(MongoTest::Widget => 1, MongoTest::Gadget => 1)
64
+ truncation.clean
65
+ ensure_counts(MongoTest::Widget => 1, MongoTest::Gadget => 0)
66
+ end
67
+ end
68
+
69
+ end
70
+
71
+ end
72
+ end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'database_cleaner/mongo_mapper/base'
3
- require 'database_cleaner/shared_strategy_spec'
3
+ require 'database_cleaner/shared_strategy'
4
4
 
5
5
  module DatabaseCleaner
6
6
  describe MongoMapper do
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'database_cleaner/sequel/base'
3
- require 'database_cleaner/shared_strategy_spec'
3
+ require 'database_cleaner/shared_strategy'
4
4
  require 'sequel'
5
5
 
6
6
  module DatabaseCleaner
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'database_cleaner/sequel/transaction'
3
- require 'database_cleaner/shared_strategy_spec'
3
+ require 'database_cleaner/shared_strategy'
4
4
  require 'sequel'
5
5
 
6
6
  module DatabaseCleaner
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'database_cleaner/sequel/truncation'
3
- require 'database_cleaner/shared_strategy_spec'
3
+ require 'database_cleaner/shared_strategy'
4
4
  require 'sequel'
5
5
 
6
6
  module DatabaseCleaner
data/spec/spec_helper.rb CHANGED
@@ -3,16 +3,18 @@ require "rubygems"
3
3
  require "bundler"
4
4
  Bundler.setup
5
5
 
6
+ require 'rspec/core'
7
+ require 'rspec/mocks'
6
8
 
7
- require 'spec'
8
9
  #require 'active_record'
9
10
  #require 'mongo_mapper'
10
- $:.unshift(File.dirname(__FILE__) + '/../lib')
11
- require 'database_cleaner'
12
11
 
12
+ $:.unshift(File.dirname(__FILE__))
13
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
13
14
 
15
+ require 'database_cleaner'
14
16
 
15
- Spec::Runner.configure do |config|
17
+ RSpec.configure do |config|
16
18
 
17
19
  end
18
20
 
@@ -0,0 +1,4 @@
1
+ def db_config
2
+ config_path = 'db/config.yml'
3
+ @db_config ||= YAML.load(IO.read(config_path))
4
+ end
@@ -0,0 +1,38 @@
1
+ require 'support/active_record/database_setup'
2
+ require 'support/active_record/schema_setup'
3
+
4
+ module MySQL2Helper
5
+ puts "Active Record #{ActiveRecord::VERSION::STRING}, mysql2"
6
+
7
+ # require 'logger'
8
+ # ActiveRecord::Base.logger = Logger.new(STDERR)
9
+
10
+ def config
11
+ db_config['mysql2']
12
+ end
13
+
14
+ def create_db
15
+ establish_connection(config.merge(:database => nil))
16
+
17
+ ActiveRecord::Base.connection.drop_database config['database'] rescue nil
18
+ ActiveRecord::Base.connection.create_database config['database']
19
+ end
20
+
21
+ def establish_connection config = config
22
+ ActiveRecord::Base.establish_connection config
23
+ end
24
+
25
+ def active_record_mysql2_setup
26
+ create_db
27
+ establish_connection
28
+ load_schema
29
+ end
30
+
31
+ def active_record_mysql2_connection
32
+ ActiveRecord::Base.connection
33
+ end
34
+ end
35
+
36
+ RSpec.configure do |c|
37
+ c.include MySQL2Helper
38
+ end
@@ -0,0 +1,38 @@
1
+ require 'support/active_record/database_setup'
2
+ require 'support/active_record/schema_setup'
3
+
4
+ module MySQLHelper
5
+ puts "Active Record #{ActiveRecord::VERSION::STRING}, mysql"
6
+
7
+ # require 'logger'
8
+ # ActiveRecord::Base.logger = Logger.new(STDERR)
9
+
10
+ def config
11
+ db_config['mysql']
12
+ end
13
+
14
+ def create_db
15
+ establish_connection(config.merge(:database => nil))
16
+
17
+ ActiveRecord::Base.connection.drop_database config['database'] rescue nil
18
+ ActiveRecord::Base.connection.create_database config['database']
19
+ end
20
+
21
+ def establish_connection config = config
22
+ ActiveRecord::Base.establish_connection config
23
+ end
24
+
25
+ def active_record_mysql_setup
26
+ create_db
27
+ establish_connection
28
+ load_schema
29
+ end
30
+
31
+ def active_record_mysql_connection
32
+ ActiveRecord::Base.connection
33
+ end
34
+ end
35
+
36
+ RSpec.configure do |c|
37
+ c.include MySQLHelper
38
+ end
@@ -0,0 +1,41 @@
1
+ require 'support/active_record/database_setup'
2
+ require 'support/active_record/schema_setup'
3
+
4
+ module PostgreSQLHelper
5
+ puts "Active Record #{ActiveRecord::VERSION::STRING}, pg"
6
+
7
+ # ActiveRecord::Base.logger = Logger.new(STDERR)
8
+
9
+ def config
10
+ db_config['postgres']
11
+ end
12
+
13
+ def create_db
14
+ @encoding = config['encoding'] || ENV['CHARSET'] || 'utf8'
15
+ begin
16
+ establish_connection(config.merge('database' => 'postgres', 'schema_search_path' => 'public'))
17
+ ActiveRecord::Base.connection.create_database(config['database'], config.merge('encoding' => @encoding))
18
+ rescue Exception => e
19
+ $stderr.puts e, *(e.backtrace)
20
+ $stderr.puts "Couldn't create database for #{config.inspect}"
21
+ end
22
+ end
23
+
24
+ def establish_connection config = config
25
+ ActiveRecord::Base.establish_connection(config)
26
+ end
27
+
28
+ def active_record_pg_setup
29
+ create_db
30
+ establish_connection
31
+ load_schema
32
+ end
33
+
34
+ def active_record_pg_connection
35
+ ActiveRecord::Base.connection
36
+ end
37
+ end
38
+
39
+ RSpec.configure do |c|
40
+ c.include PostgreSQLHelper
41
+ end
@@ -0,0 +1,10 @@
1
+ def load_schema
2
+ ActiveRecord::Schema.define do
3
+ create_table :users, :force => true do |t|
4
+ t.integer :name
5
+ end
6
+ end
7
+ end
8
+
9
+ class ::User < ActiveRecord::Base
10
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_cleaner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 8
9
- - 0
10
- version: 0.8.0
8
+ - 9
9
+ - 1
10
+ version: 0.9.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ben Mabey
@@ -15,10 +15,296 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-02 00:00:00 -06:00
19
- default_executable:
20
- dependencies: []
21
-
18
+ date: 2012-10-11 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rake
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 3
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ type: :development
32
+ requirement: *id001
33
+ prerelease: false
34
+ - !ruby/object:Gem::Dependency
35
+ name: ruby-debug
36
+ version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ hash: 3
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ type: :development
46
+ requirement: *id002
47
+ prerelease: false
48
+ - !ruby/object:Gem::Dependency
49
+ name: bundler
50
+ version_requirements: &id003 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ hash: 3
56
+ segments:
57
+ - 0
58
+ version: "0"
59
+ type: :development
60
+ requirement: *id003
61
+ prerelease: false
62
+ - !ruby/object:Gem::Dependency
63
+ name: jeweler
64
+ version_requirements: &id004 !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ hash: 3
70
+ segments:
71
+ - 0
72
+ version: "0"
73
+ type: :development
74
+ requirement: *id004
75
+ prerelease: false
76
+ - !ruby/object:Gem::Dependency
77
+ name: json_pure
78
+ version_requirements: &id005 !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 0
86
+ version: "0"
87
+ type: :development
88
+ requirement: *id005
89
+ prerelease: false
90
+ - !ruby/object:Gem::Dependency
91
+ name: activerecord
92
+ version_requirements: &id006 !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ hash: 3
98
+ segments:
99
+ - 0
100
+ version: "0"
101
+ type: :development
102
+ requirement: *id006
103
+ prerelease: false
104
+ - !ruby/object:Gem::Dependency
105
+ name: datamapper
106
+ version_requirements: &id007 !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - "="
110
+ - !ruby/object:Gem::Version
111
+ hash: 23
112
+ segments:
113
+ - 1
114
+ - 0
115
+ - 0
116
+ version: 1.0.0
117
+ type: :development
118
+ requirement: *id007
119
+ prerelease: false
120
+ - !ruby/object:Gem::Dependency
121
+ name: dm-migrations
122
+ version_requirements: &id008 !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - "="
126
+ - !ruby/object:Gem::Version
127
+ hash: 23
128
+ segments:
129
+ - 1
130
+ - 0
131
+ - 0
132
+ version: 1.0.0
133
+ type: :development
134
+ requirement: *id008
135
+ prerelease: false
136
+ - !ruby/object:Gem::Dependency
137
+ name: dm-sqlite-adapter
138
+ version_requirements: &id009 !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - "="
142
+ - !ruby/object:Gem::Version
143
+ hash: 23
144
+ segments:
145
+ - 1
146
+ - 0
147
+ - 0
148
+ version: 1.0.0
149
+ type: :development
150
+ requirement: *id009
151
+ prerelease: false
152
+ - !ruby/object:Gem::Dependency
153
+ name: mongoid
154
+ version_requirements: &id010 !ruby/object:Gem::Requirement
155
+ none: false
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ hash: 3
160
+ segments:
161
+ - 0
162
+ version: "0"
163
+ type: :development
164
+ requirement: *id010
165
+ prerelease: false
166
+ - !ruby/object:Gem::Dependency
167
+ name: tzinfo
168
+ version_requirements: &id011 !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ hash: 3
174
+ segments:
175
+ - 0
176
+ version: "0"
177
+ type: :development
178
+ requirement: *id011
179
+ prerelease: false
180
+ - !ruby/object:Gem::Dependency
181
+ name: mongo_ext
182
+ version_requirements: &id012 !ruby/object:Gem::Requirement
183
+ none: false
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ hash: 3
188
+ segments:
189
+ - 0
190
+ version: "0"
191
+ type: :development
192
+ requirement: *id012
193
+ prerelease: false
194
+ - !ruby/object:Gem::Dependency
195
+ name: bson_ext
196
+ version_requirements: &id013 !ruby/object:Gem::Requirement
197
+ none: false
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ hash: 3
202
+ segments:
203
+ - 0
204
+ version: "0"
205
+ type: :development
206
+ requirement: *id013
207
+ prerelease: false
208
+ - !ruby/object:Gem::Dependency
209
+ name: mongo_mapper
210
+ version_requirements: &id014 !ruby/object:Gem::Requirement
211
+ none: false
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ hash: 3
216
+ segments:
217
+ - 0
218
+ version: "0"
219
+ type: :development
220
+ requirement: *id014
221
+ prerelease: false
222
+ - !ruby/object:Gem::Dependency
223
+ name: couch_potato
224
+ version_requirements: &id015 !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ hash: 3
230
+ segments:
231
+ - 0
232
+ version: "0"
233
+ type: :development
234
+ requirement: *id015
235
+ prerelease: false
236
+ - !ruby/object:Gem::Dependency
237
+ name: sequel
238
+ version_requirements: &id016 !ruby/object:Gem::Requirement
239
+ none: false
240
+ requirements:
241
+ - - ~>
242
+ - !ruby/object:Gem::Version
243
+ hash: 83
244
+ segments:
245
+ - 3
246
+ - 21
247
+ - 0
248
+ version: 3.21.0
249
+ type: :development
250
+ requirement: *id016
251
+ prerelease: false
252
+ - !ruby/object:Gem::Dependency
253
+ name: mysql
254
+ version_requirements: &id017 !ruby/object:Gem::Requirement
255
+ none: false
256
+ requirements:
257
+ - - ">="
258
+ - !ruby/object:Gem::Version
259
+ hash: 3
260
+ segments:
261
+ - 0
262
+ version: "0"
263
+ type: :development
264
+ requirement: *id017
265
+ prerelease: false
266
+ - !ruby/object:Gem::Dependency
267
+ name: mysql2
268
+ version_requirements: &id018 !ruby/object:Gem::Requirement
269
+ none: false
270
+ requirements:
271
+ - - ">="
272
+ - !ruby/object:Gem::Version
273
+ hash: 3
274
+ segments:
275
+ - 0
276
+ version: "0"
277
+ type: :development
278
+ requirement: *id018
279
+ prerelease: false
280
+ - !ruby/object:Gem::Dependency
281
+ name: pg
282
+ version_requirements: &id019 !ruby/object:Gem::Requirement
283
+ none: false
284
+ requirements:
285
+ - - ">="
286
+ - !ruby/object:Gem::Version
287
+ hash: 3
288
+ segments:
289
+ - 0
290
+ version: "0"
291
+ type: :development
292
+ requirement: *id019
293
+ prerelease: false
294
+ - !ruby/object:Gem::Dependency
295
+ name: guard-rspec
296
+ version_requirements: &id020 !ruby/object:Gem::Requirement
297
+ none: false
298
+ requirements:
299
+ - - ">="
300
+ - !ruby/object:Gem::Version
301
+ hash: 3
302
+ segments:
303
+ - 0
304
+ version: "0"
305
+ type: :development
306
+ requirement: *id020
307
+ prerelease: false
22
308
  description: Strategies for cleaning databases. Can be used to ensure a clean state for testing.
23
309
  email: ben@benmabey.com
24
310
  executables: []
@@ -78,7 +364,9 @@ files:
78
364
  - lib/database_cleaner/generic/base.rb
79
365
  - lib/database_cleaner/generic/transaction.rb
80
366
  - lib/database_cleaner/generic/truncation.rb
367
+ - lib/database_cleaner/mongo/base.rb
81
368
  - lib/database_cleaner/mongo/truncation.rb
369
+ - lib/database_cleaner/mongo/truncation_mixin.rb
82
370
  - lib/database_cleaner/mongo_mapper/base.rb
83
371
  - lib/database_cleaner/mongo_mapper/truncation.rb
84
372
  - lib/database_cleaner/mongoid/base.rb
@@ -90,6 +378,10 @@ files:
90
378
  - lib/database_cleaner/sequel/truncation.rb
91
379
  - spec/database_cleaner/active_record/base_spec.rb
92
380
  - spec/database_cleaner/active_record/transaction_spec.rb
381
+ - spec/database_cleaner/active_record/truncation/mysql2_spec.rb
382
+ - spec/database_cleaner/active_record/truncation/mysql_spec.rb
383
+ - spec/database_cleaner/active_record/truncation/postgresql_spec.rb
384
+ - spec/database_cleaner/active_record/truncation/shared_fast_truncation.rb
93
385
  - spec/database_cleaner/active_record/truncation_spec.rb
94
386
  - spec/database_cleaner/base_spec.rb
95
387
  - spec/database_cleaner/configuration_spec.rb
@@ -99,25 +391,30 @@ files:
99
391
  - spec/database_cleaner/data_mapper/truncation_spec.rb
100
392
  - spec/database_cleaner/generic/base_spec.rb
101
393
  - spec/database_cleaner/generic/truncation_spec.rb
394
+ - spec/database_cleaner/mongo/mongo_examples.rb
395
+ - spec/database_cleaner/mongo/truncation_spec.rb
102
396
  - spec/database_cleaner/mongo_mapper/base_spec.rb
103
397
  - spec/database_cleaner/mongo_mapper/mongo_examples.rb
104
398
  - spec/database_cleaner/mongo_mapper/truncation_spec.rb
105
399
  - spec/database_cleaner/sequel/base_spec.rb
106
400
  - spec/database_cleaner/sequel/transaction_spec.rb
107
401
  - spec/database_cleaner/sequel/truncation_spec.rb
108
- - spec/database_cleaner/shared_strategy_spec.rb
402
+ - spec/database_cleaner/shared_strategy.rb
109
403
  - spec/rcov.opts
110
- - spec/spec.opts
111
404
  - spec/spec_helper.rb
405
+ - spec/support/active_record/database_setup.rb
406
+ - spec/support/active_record/mysql2_setup.rb
407
+ - spec/support/active_record/mysql_setup.rb
408
+ - spec/support/active_record/postgresql_setup.rb
409
+ - spec/support/active_record/schema_setup.rb
112
410
  - LICENSE
113
411
  - TODO
114
- has_rdoc: true
115
412
  homepage: http://github.com/bmabey/database_cleaner
116
413
  licenses: []
117
414
 
118
415
  post_install_message:
119
- rdoc_options:
120
- - --charset=UTF-8
416
+ rdoc_options: []
417
+
121
418
  require_paths:
122
419
  - lib
123
420
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -141,39 +438,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
438
  requirements: []
142
439
 
143
440
  rubyforge_project:
144
- rubygems_version: 1.6.2
441
+ rubygems_version: 1.8.24
145
442
  signing_key:
146
443
  specification_version: 3
147
444
  summary: Strategies for cleaning databases. Can be used to ensure a clean state for testing.
148
- test_files:
149
- - spec/database_cleaner/active_record/base_spec.rb
150
- - spec/database_cleaner/active_record/transaction_spec.rb
151
- - spec/database_cleaner/active_record/truncation_spec.rb
152
- - spec/database_cleaner/base_spec.rb
153
- - spec/database_cleaner/configuration_spec.rb
154
- - spec/database_cleaner/couch_potato/truncation_spec.rb
155
- - spec/database_cleaner/data_mapper/base_spec.rb
156
- - spec/database_cleaner/data_mapper/transaction_spec.rb
157
- - spec/database_cleaner/data_mapper/truncation_spec.rb
158
- - spec/database_cleaner/generic/base_spec.rb
159
- - spec/database_cleaner/generic/truncation_spec.rb
160
- - spec/database_cleaner/mongo_mapper/base_spec.rb
161
- - spec/database_cleaner/mongo_mapper/mongo_examples.rb
162
- - spec/database_cleaner/mongo_mapper/truncation_spec.rb
163
- - spec/database_cleaner/sequel/base_spec.rb
164
- - spec/database_cleaner/sequel/transaction_spec.rb
165
- - spec/database_cleaner/sequel/truncation_spec.rb
166
- - spec/database_cleaner/shared_strategy_spec.rb
167
- - spec/spec_helper.rb
168
- - examples/features/step_definitions/activerecord_steps.rb
169
- - examples/features/step_definitions/couchpotato_steps.rb
170
- - examples/features/step_definitions/datamapper_steps.rb
171
- - examples/features/step_definitions/mongoid_steps.rb
172
- - examples/features/step_definitions/mongomapper_steps.rb
173
- - examples/features/step_definitions/translation_steps.rb
174
- - examples/features/support/env.rb
175
- - examples/lib/activerecord_models.rb
176
- - examples/lib/couchpotato_models.rb
177
- - examples/lib/datamapper_models.rb
178
- - examples/lib/mongoid_models.rb
179
- - examples/lib/mongomapper_models.rb
445
+ test_files: []
446
+