Sha256: b7013cee2bc0a1e028a940b27787680f1ff0eb92d2fb1e5430d299bbf0ec6f6a
Contents?: true
Size: 968 Bytes
Versions: 1
Compression:
Stored size: 968 Bytes
Contents
ENV["AR_ENV"] ="test" require 'connection_manager' require 'rspec' require 'bundler/setup' require 'active_record' require 'active_support' require 'logger' require 'factory_girl' require 'helpers/database_spec_helper' if(defined? RUBY_ENGINE and 'jruby' == RUBY_ENGINE) TestDB.connect('jdbcmysql') else TestDB.connect('mysql2') end TestMigrations.down TestMigrations.up FactoryGirl.find_definitions # ActiveRecord::Base.logger = Logger.new(STDOUT) RSpec.configure do |config| config.mock_with :mocha # Loads database.yml and establishes primary connection # Create tables when tests are completed config.before(:suite) { require 'helpers/models_spec_helper.rb' } # Drops tables when tests are completed config.after(:suite){ TestDB.clean } # Make sure every test is isolated. config.before(:each){ ModelsHelper.models.each{|m| Object.send(:remove_const, m)} load 'helpers/models_spec_helper.rb' FactoryGirl.reload } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
connection_manager-1.0.4 | spec/spec_helper.rb |