From 685e926d96358af65c2eb85e91dd79ff0d9d7443 Mon Sep 17 00:00:00 2001 From: Ryan Bates Date: Tue, 4 Jan 2011 10:55:48 -0800 Subject: [PATCH] moving with_model rspec configuration into Active Record model adapter spec --- spec/cancan/model_adapters/active_record_adapter_spec.rb | 4 ++++ spec/spec_helper.rb | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/cancan/model_adapters/active_record_adapter_spec.rb b/spec/cancan/model_adapters/active_record_adapter_spec.rb index edc935d..6a945d3 100644 --- a/spec/cancan/model_adapters/active_record_adapter_spec.rb +++ b/spec/cancan/model_adapters/active_record_adapter_spec.rb @@ -1,6 +1,10 @@ if ENV["MODEL_ADAPTER"].nil? || ENV["MODEL_ADAPTER"] == "active_record" require "spec_helper" + RSpec.configure do |config| + config.extend WithModel + end + ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:") describe CanCan::ModelAdapters::ActiveRecordAdapter do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2971859..7e7a55e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -14,7 +14,6 @@ RSpec.configure do |config| Project.delete_all Category.delete_all end - config.extend WithModel if defined? WithModel end class Ability