Permalink
Browse files

Dev: establish connection earlier and more generally.

- supports running specs against rails-master
  • Loading branch information...
1 parent 17b7e0d commit 7f7ed29a16821729448088d2c65e6530e9fca103 @dchelimsky dchelimsky committed Apr 9, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 spec/rspec/rails/mocks/ar_classes.rb
View
7 spec/rspec/rails/mocks/ar_classes.rb
@@ -1,7 +1,10 @@
+ActiveRecord::Base.establish_connection(
+ :adapter => 'sqlite3',
+ :database => ':memory:'
+)
+
module Connections
def self.extended(host)
- host.establish_connection :adapter => 'sqlite3',
- :database => ':memory:'
host.connection.execute <<-eosql
CREATE TABLE #{host.table_name} (

0 comments on commit 7f7ed29

Please sign in to comment.