Sha256: 61d02ee554b392458ab12eb718198952cb21134d8008db761206ead08f1245d2
Contents?: true
Size: 1008 Bytes
Versions: 5
Compression:
Stored size: 1008 Bytes
Contents
require 'rubygems' gem 'minitest' require 'minitest/autorun' require 'active_record' # Configure Rails Environment environment = ENV["RAILS_ENV"] = 'test' rails_root = File.expand_path('../dummy', __FILE__) database_yml = File.expand_path('config/database.yml', rails_root) ActiveRecord::Base.configurations = YAML.load_file(database_yml) config = ActiveRecord::Base.configurations[environment] db = File.expand_path(config['database'], rails_root) # Drop the test database and migrate up FileUtils.rm(db) if File.exist?(db) ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => db) ActiveRecord::Base.connection ActiveRecord::Migration.verbose = false ActiveRecord::Migrator.up File.expand_path('db/migrate', rails_root) # Load dummy rails app require File.expand_path('config/environment.rb', rails_root) Rails.backtrace_cleaner.remove_silencers! # Load support files (reloadable reloads canard) Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
canard-0.4.0.pre | test/test_helper.rb |
canard-0.3.7 | test/test_helper.rb |
canard-0.3.6 | test/test_helper.rb |
canard-0.3.5 | test/test_helper.rb |
canard-0.3.4 | test/test_helper.rb |