diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4ea3071515..0031f6903f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,27 +5,14 @@ require 'arel' require 'support/matchers/be_like' require 'support/check' -Dir[File.join(File.dirname(__FILE__),'support/shared/*')].each { |f| require f } - -if adapter = ENV['ADAPTER'] - require "support/connections/#{adapter}_connection.rb" -end +require 'support/fake_record' +require 'support/shared/tree_manager_shared' Spec::Runner.configure do |config| config.include Matchers config.include Check - if defined?(ActiveRecord::Base) - tmp = File.expand_path('../../tmp', __FILE__) - - FileUtils.mkdir_p(tmp) - ActiveRecord::Base.logger = Logger.new("#{tmp}/debug.log") - ActiveRecord::Base.establish_connection("unit") - - require "support/schemas/#{ENV['ADAPTER']}_schema.rb" - - config.before do - Arel::Table.engine = Arel::Sql::Engine.new(ActiveRecord::Base) - end + config.before do + Arel::Table.engine = Arel::Sql::Engine.new(FakeRecord::Base) end end |