Sha256: 8c5c53957dd503c0eefe6e4fc310c6b68f0be3469c75fe974d46a83cf5754fb7
Contents?: true
Size: 632 Bytes
Versions: 4
Compression:
Stored size: 632 Bytes
Contents
require 'yaml' system("mysql -uroot < spec/db_schema.sql") module ActiveRecord class Base self.configurations = YAML.load_file(File.join(File.dirname(__FILE__), "database.yml")) establish_connection(configurations["test"]) establish_fresh_connection :slave1 end end class Parent < ActiveRecord::Base self.abstract_class = true end class Slave2 < ActiveRecord::Base self.abstract_class = true establish_fresh_connection :slave2 end class User < ActiveRecord::Base has_one :address has_many :tels end class Address < ActiveRecord::Base belongs_to :user end class Tel < Slave2 belongs_to :user end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fresh_connection-0.2.5 | spec/prepare.rb |
fresh_connection-0.2.4 | spec/prepare.rb |
fresh_connection-0.2.3 | spec/prepare.rb |
fresh_connection-0.2.2 | spec/prepare.rb |