Updatin to not depend on Rails 3, only ActiveRecord, both in gem file and in tests

This commit is contained in:
Zach Dennis 2010-10-05 22:32:55 -04:00
parent 142a61aaa9
commit 6c9cbc096c
2 changed files with 2 additions and 6 deletions

View file

@ -1,6 +1,6 @@
source :gemcutter
gem "rails", "~> 3.0.0rc"
gem "activerecord", "~> 3.0.0rc"
group :development do
gem "jeweler", ">= 1.4.0"

View file

@ -12,8 +12,7 @@ require "bundler"
Bundler.setup
require "logger"
require "rails"
require "rails/test_help"
require 'test/unit'
require "active_record"
require "active_record/fixtures"
require "active_support/test_case"
@ -21,7 +20,6 @@ require "active_support/test_case"
require "delorean"
require "ruby-debug"
class MyApplication < Rails::Application ; end
adapter = ENV["ARE_DB"] || "sqlite3"
FileUtils.mkdir_p 'log'
@ -29,11 +27,9 @@ ActiveRecord::Base.logger = Logger.new("log/test.log")
ActiveRecord::Base.logger.level = Logger::DEBUG
ActiveRecord::Base.configurations["test"] = YAML.load(test_dir.join("database.yml").open)[adapter]
require "activerecord-import"
ActiveRecord::Base.establish_connection "test"
ActiveSupport::Notifications.subscribe(/active_record.sql/) do |event, _, _, _, hsh|
ActiveRecord::Base.logger.info hsh[:sql]
end