Sha256: 25c20af8dfbe878f50bd010e2fadfdb2ab3f24bd0f994f1f54d844c24cb8deb9
Contents?: true
Size: 707 Bytes
Versions: 3
Compression:
Stored size: 707 Bytes
Contents
require "rubygems" require "rspec" require "factory_girl" require "faker" require "active_record" require "active_support" # Establish DB Connection config = YAML::load(IO.read(File.join(File.dirname(__FILE__), 'db', 'database.yml'))) ActiveRecord::Base.configurations = {'test' => config[ENV['DB'] || 'sqlite3']} ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test']) # Load Test Schema into the Database load(File.dirname(__FILE__) + "/db/schema.rb") require File.dirname(__FILE__) + '/../init' # Example has_draft Model: class Article < ActiveRecord::Base has_draft end # Load Factories: Dir[File.join(File.dirname(__FILE__), "factories/**/*.rb")].each {|f| require f}
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
has_draft-1.2.0 | spec/spec_helper.rb |
has_draft-1.1.0 | spec/spec_helper.rb |
has_draft-1.0.2 | spec/spec_helper.rb |