test/test_helper.rb in delocalize-0.1.4 vs test/test_helper.rb in delocalize-0.1.5

- old
+ new

@@ -1,7 +1,8 @@ ENV["RAILS_ENV"] = "test" -require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment") +#require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment") +require File.expand_path(File.dirname(__FILE__) + "/rails_app/config/environment") require 'test_help' require 'rubygems' require 'active_record' require 'active_record/test_case' @@ -56,16 +57,17 @@ end class Product < ActiveRecord::Base end -config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml')) +config = YAML.load_file(File.dirname(__FILE__) + '/database.yml') ActiveRecord::Base.establish_connection(config['test']) ActiveRecord::Base.connection.create_table :products do |t| t.string :name t.date :released_on t.datetime :published_at t.time :cant_think_of_a_sensible_time_field t.decimal :price + t.float :weight t.integer :times_sold -end \ No newline at end of file +end