Permalink
Browse files

moving with_model rspec configuration into Active Record model adapte…

…r spec
  • Loading branch information...
1 parent bd9480c commit 685e926d96358af65c2eb85e91dd79ff0d9d7443 @ryanb committed Jan 4, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −0 spec/cancan/model_adapters/active_record_adapter_spec.rb
  2. +0 −1 spec/spec_helper.rb
View
4 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
View
1 spec/spec_helper.rb
@@ -14,7 +14,6 @@
Project.delete_all
Category.delete_all
end
- config.extend WithModel if defined? WithModel
end
class Ability

0 comments on commit 685e926

Please sign in to comment.