Sha256: 620b66ac87abdcc3a6e6d319256b90208f57b3133980add4da208238315ab735
Contents?: true
Size: 936 Bytes
Versions: 3
Compression:
Stored size: 936 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 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
connection_manager-1.0.3 | spec/spec_helper.rb |
connection_manager-1.0.2 | spec/spec_helper.rb |
connection_manager-1.0.1 | spec/spec_helper.rb |