Sha256: 2ec212e6d9891a6e59289617893088e58acc62cc5f08edc6f82048f45f279833

Contents?: true

Size: 733 Bytes

Versions: 7

Compression:

Stored size: 733 Bytes

Contents

if RUBY_VERSION > "1.9"
  require 'simplecov'
  require 'simplecov-gem-adapter'
  SimpleCov.start "gem"
end

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'rspec'
require 'active_record'
require 'schema_validations'
require 'logger'
require 'connection'

Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}

def remove_all_models
  ObjectSpace.each_object(Class) do |c|
    next unless c.ancestors.include? ActiveRecord::Base
    next if c == ActiveRecord::Base
    next if c.name.blank?
    ActiveSupport::Dependencies.remove_constant c.name
  end
end

SimpleCov.command_name ActiveRecord::Base.connection.adapter_name if defined? SimpleCov

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
schema_validations-0.2.2 spec/spec_helper.rb
schema_validations-0.2.1 spec/spec_helper.rb
schema_validations-0.2.0 spec/spec_helper.rb
schema_validations-0.1.2 spec/spec_helper.rb
schema_validations-0.1.1 spec/spec_helper.rb
schema_validations-0.1.0 spec/spec_helper.rb
schema_validations-0.1.0.pre4 spec/spec_helper.rb