Permalink
Browse files

rails loads the extension from the railtie, but the spec must load it…

… by hand
  • Loading branch information...
1 parent 1332587 commit a97b2b1b366eb26f9ef9124c8fed2fa39daa4315 @rewritten rewritten committed Oct 5, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 spec/spec_helper_ar.rb
View
3 spec/spec_helper_ar.rb
@@ -2,8 +2,11 @@
require 'active_record'
require 'symbolize/active_record'
+ActiveRecord::Base.send :include, Symbolize::ActiveRecord # this is normally done by the railtie
+
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:") #'postgresql', :database => 'symbolize_test', :username => 'postgres')
+
if ActiveRecord::VERSION::STRING >= "3.1"
ActiveRecord::Migrator.migrate("spec/db")
else

0 comments on commit a97b2b1

Please sign in to comment.