mirror of
				https://github.com/DatabaseCleaner/database_cleaner
				synced 2023-03-27 23:22:03 -04:00 
			
		
		
		
	add .default_strategy method to all adapters, and move knowledge into it from core.
This commit is contained in:
		
							parent
							
								
									054404fb37
								
							
						
					
					
						commit
						c0a9610ce9
					
				
					 23 changed files with 124 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue