Sha256: a50bb623e990b6cab6514ca6099c1c5d53e574f77d253ada7249aec0204a1079
Contents?: true
Size: 702 Bytes
Versions: 4
Compression:
Stored size: 702 Bytes
Contents
require 'rubygems' require 'activerecord' require 'yaml' require 'spec' require File.dirname(__FILE__) + '/../init.rb' # Establish database connection. config = YAML::load(File.open(File.dirname(__FILE__) + '/database.yml')) ActiveRecord::Base.establish_connection(config['test']) load(File.dirname(__FILE__) + "/schema.rb") # Define ActiveRecord classes to use while testing. class Author < ActiveRecord::Base has_many :posts has_many :comments has_many :sessions end class Comment < ActiveRecord::Base belongs_to :author, :null_object => true end class Post < ActiveRecord::Base belongs_to :author, :null_object => false end class Session < ActiveRecord::Base belongs_to :author end
Version data entries
4 entries across 4 versions & 2 rubygems