add .default_strategy method to all adapters, and move knowledge into it from core.

This commit is contained in:
Micah Geisel 2019-12-11 23:51:45 -08:00
parent 054404fb37
commit c0a9610ce9
23 changed files with 124 additions and 12 deletions

View file

@ -2,3 +2,9 @@ require "database_cleaner/ohm/version"
require "database_cleaner"
require "database_cleaner/ohm/truncation"
module DatabaseCleaner::Ohm
def self.default_strategy
:truncation
end
end

View file

@ -0,0 +1,8 @@
require 'database_cleaner/ohm'
RSpec.describe DatabaseCleaner::Ohm do
it "has a default_strategy of truncation" do
expect(described_class.default_strategy).to eq(:truncation)
end
end