test/helper.rb in property_sets-0.5.6 vs test/helper.rb in property_sets-0.5.8
- old
+ new
@@ -3,12 +3,22 @@
require 'test/unit'
require 'active_record'
require 'active_record/fixtures'
require 'shoulda'
-ActiveRecord::Base.configurations = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
-ActiveRecord::Base.establish_connection('test')
-ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/test.log")
+ActiveRecord::Base.establish_connection(
+ :adapter => 'mysql',
+ :database => 'property_sets_test',
+ :username => 'root',
+ :password => nil,
+ :host => '127.0.0.1',
+ :port => 3306
+)
+
+ActiveRecord::Base.logger = Logger.new(STDOUT)
+ActiveRecord::Base.logger.level = Logger::ERROR
+
+ActiveRecord::Migration.verbose = false
load(File.dirname(__FILE__) + "/schema.rb")
$LOAD_PATH.unshift(File.dirname(__FILE__))
require File.dirname(__FILE__)+'/../lib/property_sets'