moving with_model rspec configuration into Active Record model adapter spec
This commit is contained in:
		
							parent
							
								
									bd9480cb51
								
							
						
					
					
						commit
						685e926d96
					
				@ -1,6 +1,10 @@
 | 
				
			|||||||
if ENV["MODEL_ADAPTER"].nil? || ENV["MODEL_ADAPTER"] == "active_record"
 | 
					if ENV["MODEL_ADAPTER"].nil? || ENV["MODEL_ADAPTER"] == "active_record"
 | 
				
			||||||
  require "spec_helper"
 | 
					  require "spec_helper"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  RSpec.configure do |config|
 | 
				
			||||||
 | 
					    config.extend WithModel
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
 | 
					  ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  describe CanCan::ModelAdapters::ActiveRecordAdapter do
 | 
					  describe CanCan::ModelAdapters::ActiveRecordAdapter do
 | 
				
			||||||
 | 
				
			|||||||
@ -14,7 +14,6 @@ RSpec.configure do |config|
 | 
				
			|||||||
    Project.delete_all
 | 
					    Project.delete_all
 | 
				
			||||||
    Category.delete_all
 | 
					    Category.delete_all
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  config.extend WithModel if defined? WithModel
 | 
					 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Ability
 | 
					class Ability
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user